dpnp.zeros
- dpnp.zeros(shape, dtype=None, order='C')[source]
Return a new array of given shape and type, filled with zeros.
For full documentation refer to
numpy.zeros
.Limitations
Parameter
order
is supported only with default value"C"
.See also
dpnp.zeros_like
Return an array of zeros with shape and type of input.
dpnp.empty
Return a new uninitialized array.
dpnp.ones
Return a new array setting values to one.
dpnp.full
Return a new array of given shape filled with value.
Examples
>>> import dpnp as np >>> [i for i in np.zeros(5)] [0.0, 0.0, 0.0, 0.0, 0.0] >>> x = np.zeros((2, 1)) >>> x.ndim, x.size, x.shape (2, 2, (2, 1)) >>> [i for i in x] [0.0, 0.0]