import numpy as np arr = np.array([[1, 2, 3, 4], [5, 6, 7, 8]]) print(arr.shape). 上面的示例返回 (2, 4) ,这意味着数组具有2个维,每个维具有4个元素。
確定! 回上一頁