使用PyPlot的Julia错误-信号(11):分段错误 [英] Julia error using PyPlot - signal (11): Segmentation fault

查看:62
本文介绍了使用PyPlot的Julia错误-信号(11):分段错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

学习通过Julia编程语言(版本0.4.5)使用PyPlot时,在尝试生成简单的绘图时遇到了错误:

Learning to use PyPlot with Julia programming language (Version 0.4.5), I've encountered an error while trying to produce a simple plot:

julia> using PyPlot

julia> x = linspace(0,100,1000)
linspace(0.0,100.0,1000)

julia> y = x.^2;

julia> plot(x,y)

signal (11): Segmentation fault
unknown function (ip: 0x32736)
Segmentation fault (core dumped)

有人知道这是怎么回事吗?

Someone knows what's going on here?

推荐答案

0.4.6上运行时,我无法重现您的错误.我的想法是:

I can't reproduce your error when running on 0.4.6. My thoughts would be:

  1. 更新到最新版本.
  2. 更新所有软件包
  3. 退出并重新启动julia
  4. 如果这些都不起作用,则可以想象plot函数不喜欢参数类型的不匹配.因此,您可以应用collect(x)以便xy均为Array类型.
  1. Update to latest version.
  2. Update all your packages
  3. Quit and restart julia
  4. If none of those work, it's conceivable perhaps that the plot function doesn't like the mismatch of argument types. Thus, you could apply collect(x) so that both x and y are of type Array.

这篇关于使用PyPlot的Julia错误-信号(11):分段错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆