cf.Data.ndim

Data.ndim

Number of dimensions in the data array.

Examples:

>>> d.shape
(73, 96)
>>> d.ndim
2
>>> d.shape
()
>>> d.ndim
0