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 asdpnp.ndarray
. Dimension of input array is limited byx1.ndim != 0
. Keyword argumentskwargs
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]