dpnp.dpnp_array.dpnp_array.ndim

property

property dpnp_array.ndim

Return the number of dimensions of an array.

For full documentation refer to numpy.ndarray.ndim.

Returns:

number_of_dimensions -- The number of dimensions in a.

Return type:

int

See also

dpnp.ndim

Equivalent method for any array-like input.

dpnp.shape

Return the shape of an array.

dpnp.ndarray.shape

Return 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