ndim

property Tensor5.ndim

As for numpy.ndarray