copapy.sign#

copapy.sign(x)#

Return 1 for positive numbers and -1 for negative numbers. For an input of 0 the return value is 0.

Parameters:

x (TypeVar(U, int, float) | value[TypeVar(U, int, float)] | vector[TypeVar(U, int, float)]) – Input value

Return type:

Any

Returns:

-1, 0 or 1