ndim

property Tensor6.ndim

As for numpy.ndarray