小编Ind*_*ana的帖子

模块“scipy.ndimage”没有属性“imread”

我正在尝试从 scipy 读取图像。但它给出错误“没有属性'imread'”。可能是什么原因造成的?

AttributeError                            Traceback (most recent call last)
<ipython-input-29-311aa4fc2e10> in <module>
      5 
      6 fname = "images/" + my_image
----> 7 image = np.array(ndimage.imread(fname, flatten=False))
      8 my_image = scipy.misc.imresize(image, size=(num_px,num_px)).reshape((num_px*num_px*3,1))
      9 my_image = my_image/255.

AttributeError: module 'scipy.ndimage' has no attribute 'imread'
Run Code Online (Sandbox Code Playgroud)

python scipy imread

2
推荐指数
1
解决办法
3699
查看次数

标签 统计

imread ×1

python ×1

scipy ×1