dpnp.absolute

dpnp.absolute(x1, **kwargs)[source]

Calculate the absolute value element-wise.

For full documentation refer to numpy.absolute.

See also

dpnp.abs : Calculate the absolute value element-wise.

Limitations

Parameter x1 is supported as dpnp.ndarray. Dimension of input array is limited by x1.ndim != 0. Keyword arguments kwargs are currently unsupported. Otherwise the functions will be executed sequentially on CPU. Input array data types are limited by supported DPNP Data types.

Examples

>>> import dpnp as np
>>> a = np.array([-1.2, 1.2])
>>> result = np.absolute(a)
>>> [x for x in result]
[1.2, 1.2]