Numpy array dimensions

Use .shape to obtain a tuple of array dimensions:

>>> a.shape
(2, 2)

Leave a Comment