signum - compute the sign of a value
val.signum()
The signum() method computes the sign of the
given val. It returns:
If val is an array, the operation is performed element-wise. All elements of val must be numeric.
A value or array containing the sign of each element in val. The type of the result is the same as the type of val (or its elements).
TypeCheck if val (or any of its
elements) is not numeric
[ -5.5, 0, 10.5 ].signum()
-1. 0. 1.
[ -5, 0, 10 ].signum()
-1 0 1