dpnp.full_like
- dpnp.full_like(x1, fill_value, dtype=None, order='C', subok=False, shape=None)[source]
Return a full array with the same shape and type as a given array.
For full documentation refer to
numpy.full_like.Limitations
Parameter
orderis supported only with default value"C". Parametersubokis supported only with default valueFalse.See also
dpnp.empty_likeReturn an empty array with shape and type of input.
dpnp.ones_likeReturn an array of ones with shape and type of input.
dpnp.zeros_likeReturn an array of zeros with shape and type of input.
dpnp.fullReturn a new array of given shape filled with value.
Examples
>>> import dpnp as np >>> a = np.arange(6) >>> x = np.full_like(a, 1) >>> [i for i in x] [1.0, 1.0, 1.0, 1.0, 1.0, 1.0]