numpy.record.ndim

record.ndim
number of array dimensions

This Page