partially initialized module ‘numpy‘ has no attribute ‘array‘ (most likely due to a circular import)

學習numpy時寫第一個程序報錯如下: partially initialized module ‘numpy’ has no attribute ‘array’ (most likely due to a circular import) 程序代碼: 在命令行中可以執行: 報錯原因: 因爲文件名使用的"numpy"是包名!!! 切記:不能使用包名和類名來命名!!! 解決方案: 將文件名修改爲非類
相關文章
相關標籤/搜索