ndim

property Tensor3.ndim

As for numpy.ndarray