numpy.generic.ndim

attribute

generic.ndim

The number of array dimensions.