cupy.sign#

cupy.sign(x, /, out=None, \*, casting='same_kind', dtype=None)#

Elementwise sign function.

Returns -1, 0, or 1 depending on the sign of the input. NaN is returned for NaN inputs. For complex values, sign returns x/abs(x) (and 0 if x == 0).

See also

numpy.sign