dpnp.zeros_like
- dpnp.zeros_like(x1, dtype=None, order='C', subok=False, shape=None)[source]
Return an array of zeros with the same shape and type as a given array.
For full documentation refer to
numpy.zeros_like
.Limitations
Parameter
order
is supported only with default value"C"
. Parametersubok
is supported only with default valueFalse
.See also
dpnp.empty_like
Return an empty array with shape and type of input.
dpnp.ones_like
Return an array of ones with shape and type of input.
dpnp.full_like
Return a new array with shape of input filled with value.
dpnp.zeros
Return a new array setting values to zero.
Examples
>>> import dpnp as np >>> x = np.arange(6) >>> [i for i in x] [0.0, 1.0, 2.0, 3.0, 4.0, 5.0] >>> [i for i in np.zeros_like(x)] [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]