property
Return the number of dimensions of an array.
For full documentation refer to numpy.ndarray.ndim.
number_of_dimensions -- The number of dimensions in a.
See also
dpnp.ndimEquivalent method for any array-like input.
dpnp.shapeReturn the shape of an array.
dpnp.ndarray.shapeReturn the shape of an array.
Examples
>>> import dpnp as np
>>> x = np.array([1, 2, 3])
>>> x.ndim
1
>>> y = np.zeros((2, 3, 4))
>>> y.ndim
3