问题原因

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

 

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

 

解决办法:

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

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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
猜你喜欢
  • 2021-09-15
  • 2021-07-27
  • 2022-02-07
  • 2021-06-27
  • 2022-12-23
相关资源
相似解决方案