dpnp.sign
- dpnp.sign(x1, **kwargs)[source]
Returns an element-wise indication of the sign of a number.
For full documentation refer to
numpy.sign
.Limitations
Parameter
x1
is supported asdpnp.ndarray
. 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 >>> result = np.sign(np.array([-5., 4.5])) >>> [x for x in result] [-1.0, 1.0]