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 order is supported only with default value "C". Parameter subok is supported only with default value False.

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.zeros_like

Return an array of zeros with shape and type of input.

dpnp.full

Return 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]