I am new to python and its various libraries. Currently, I am learning numpy and want to know if there is any function which will return the dimension of my array. For example:

Import numpy as np
arr=np.array([[1,2],[3,]])

I want to know its dimensions whether it’s a 2-d array or not. I even use the shape function but that could not come to my use.