总结:
首先
import numpy as np
A = np.random.randint(1,100,size = (4,5))
>>A>>array([[56, 96, 27, 38, 33], [86, 64, 52, 21, 66], [97, 84, 94, 20, 82], [65, 17, 77, 9, 17]])
通常情况下,列表、元组、字典采用len(A),而数组、矩阵采用np.size(A)或A.size。