dpnp.square
- dpnp.square(x1)[source]
Return the element-wise square of the input.
For full documentation refer to
numpy.square
.Limitations
Input array is supported as
dpnp.ndarray
. Input array data types are limited by supported DPNP Data types.See also
dpnp.sqrt
Return the positive square-root of an array, element-wise.
dpnp.power
First array elements raised to powers from second array, element-wise.
Examples
>>> import dpnp as np >>> x = np.array([1, 2, 3]) >>> out = np.square(x) >>> [i for i in out] [1, 4, 9]