Array Properties
Every array carries metadata:
.shape— dimensions as a tuple.dtype— data type.ndim— number of dimensions
a = np.array([[1, 2], [3, 4]]) print(a.shape) # (2, 2) print(a.dtype) # int64 print(a.ndim) # 2
Why this matters
shape, dtype, and ndim are how libraries agree on memory layout. Wrong expectations here cause silent bugs when you stack, save, or pass arrays into C/Fortran-backed code.

Getting comfortable reading these three fields makes errors like "operands could not be broadcast" much easier to debug.
ResourcesDocs, references & more — opens in a new tab
🎯 Your Task
Create a 2D array matrix with shape (2, 3). Print its shape, dtype, and ndim.
np.array([[1,2,3],[4,5,6]])
⌘⏎ run · ⌘← → nav
▶ Output
Run your code to see output here.