import numpy #創建一位陣列 a=numpy.array([1,2,3,4]) b=numpy.arange(4,10) #創建三維陣列 c=numpy.random.randint(4,10,size=(3,3,4)) #ndarray屬性 print(c.ndim) # 回傳維度 #shape屬性 print(c.shape) #列印行列數和維度 #dtype屬性 print(c.dtype) print(c.size) #元祖里面的元素總和 #itemsize每個元素占的位元組 print(c.itemsize)
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/125441.html
標籤:Python
上一篇:Laravel檔案工具
下一篇:01.DRF-Web應用模式
