Array Attributes
shape, ndim, size, dtype and itemsize describe an array.
Example
a = np.arange(12).reshape(3, 4)
print(a.shape, a.ndim, a.size, a.dtype, a.itemsize)Result
(3, 4) 2 12 int64 8
Exercise
Dimensions count.
a.Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.