使用PyPlot的Julia错误-信号(11):分段错误 [英] Julia error using PyPlot - signal (11): Segmentation fault
本文介绍了使用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:
- 更新到最新版本.
- 更新所有软件包
- 退出并重新启动julia
- 如果这些都不起作用,则可以想象
plot
函数不喜欢参数类型的不匹配.因此,您可以应用collect(x)
以便x
和y
均为Array
类型.
- Update to latest version.
- Update all your packages
- Quit and restart julia
- If none of those work, it's conceivable perhaps that the
plot
function doesn't like the mismatch of argument types. Thus, you could applycollect(x)
so that bothx
andy
are of typeArray
.
这篇关于使用PyPlot的Julia错误-信号(11):分段错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文