02 ndarray的屬性 、ndarray的基本操作(索引、切片、變形、連接、切分、副本)、聚合操作、矩陣操作、排序、Panda數據結構、Series創建、索引與切片、屬性與方法、運算

二、ndarray的屬性 4個必記參數: ndim:維度 shape:形狀(各維度的長度) size:總長度 dtype:元素類型 import matplotlib.pyplot as plt ndarr = plt.imread("./jin.png") plt.imshow(ndarr) # 接下來展示的是幾個屬性 ndarr.ndim # 多少個維度 ndarr.shape # 形狀 2
相關文章
相關標籤/搜索