Lesson 2
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.