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
orderis supported only with default value"C".See also
dpnp.zeros_likeReturn an array of zeros with shape and type of input.
dpnp.emptyReturn a new uninitialized array.
dpnp.onesReturn a new array setting values to one.
dpnp.fullReturn 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]