AttributeError: 'module' object has no attribute 'array'

问题原因

  1. 报错信息: AttributeError: 'module' object has no attribute 'array'
  2. 错误原因:arraqy = np.array([[1,2,3],[2,3,4]])这句代码所在的文件的路径中包含了以numpy命名的文件夹或者文件.
  3. 试例见下图:

解决办法:

  1. 工程内不可以使用numpy命名文件夹或者文件.
  2. 如下图所示:

猜你喜欢

转载自blog.csdn.net/weixin_39527812/article/details/82912745