Python scipy中缺少ndimage
我试图使用scipy的ndimage库,但它显然不存在。我已经运行了numpy和scipy的测试,结果还可以。我使用的是从sourceforge上的官方软件包安装的numpy 1.6.1和scipy 0.10.0 运行Python scipy中缺少ndimage,python,scipy,Python,Scipy,我试图使用scipy的ndimage库,但它显然不存在。我已经运行了numpy和scipy的测试,结果还可以。我使用的是从sourceforge上的官方软件包安装的numpy 1.6.1和scipy 0.10.0 运行 import numpy import scipy import pprint print(scipy.version.version) print(numpy.version.version) img = scipy.ndimage.imread("") 给予 0.10.
import numpy
import scipy
import pprint
print(scipy.version.version)
print(numpy.version.version)
img = scipy.ndimage.imread("")
给予
0.10.0
1.6.1
回溯(最近一次呼叫最后一次):
文件“extract.py”,第8行,在
img=scipy.ndimage.imread(“”)
AttributeError:“模块”对象没有属性“nImage”
您必须导入模块:
import scipy.ndimage
模块应按如下方式导入:
from scipy import ndimage
在scipy中找到init文件并添加导入ndimage
imread已被弃用!在SciPy 1.0.0中不推荐使用imread,并将在1.2.0中删除。改用
imageio.imread
。我也有同样的问题,现在用你的方法解决了。但是在我的ipython解释器中,在导入scipy
之后,使用scipy.ndimage.filters.gaussian_filter1d
不会抛出错误。为什么?你确定这个语法吗?
from scipy import ndimage