import numpy as np
arr = np.array([[1, 2], [3, 4], [5, 6]])
shp = arr.shape
import numpy as np
- load lib:Numpy module for Pythonnp.array
- declare Numpy array[[1, 2], [3, 4], [5, 6]]
- sample multi-dimensional array.shape
- attribute returns shape of given array
group: shape
import numpy as np
arr = np.array([[1, 2], [3, 4], [5, 6]])
shp = arr.shape
print(shp)
(3, 2)
link_youtube: https://youtu.be/ZZgpE5EQ_J8