NumPy | shape property
Start your free 7-days trial now!
shape property returns the number of elements along each axis of the array as a
, followed by nothing simply means that the array is a vector with 3 elements.
This tells us that
x has 2 rows and 3 columns.
Accessing values inside a tuple
Note that since the return type is just a tuple, you can access the actual numbers using
 syntax, like so: