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 argument kwargs is currently unsupported. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP Available array data types.

See also

dpnp.absolute

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]