為什么顯示說numpy沒有數(shù)組屬性?
代碼:
import?numpy?as?np def?main(): ????lst=[[1,3,5],[2,4,6]] ????print(type(lst)) ????a?=?np.array([[1,?2],?[3,?4]]) ????print(a[1,?0]) if?__name__?==?'__main__': ????main()
為什么總是顯示這個問題:AttributeError: module 'numpy' has no attribute 'array'
2019-10-14
語句沒問題,應(yīng)該是環(huán)境問題,建議重新安裝anaconda
2019-04-04
重裝一下numpy庫