["python","arrays","numpy","dimensions"]
Numpy array dimensions

How do I get the dimensions of an array? For instance, this is 2x2: a = np.array([[1, 2], [3, 4]])
Use .shape to obtain a tuple of array dimensions: >>> a.shape (2, 2)