dpnp.fabs

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

Compute the absolute values element-wise.

For full documentation refer to numpy.fabs.

Limitations

Parameter x1 is supported as dpnp.ndarray. 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.

See also

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

Examples

>>> import dpnp as np
>>> result = np.fabs(np.array([1, -2, 6, -9]))
>>> [x for x in result]
[1.0, 2.0, 6.0, 9.0]