get_shared_numeric_sign

mathtools.get_shared_numeric_sign(argument)

Gets shared numeric sign of items in argument.

Returns 1 when all argument items are positive:

>>> mathtools.get_shared_numeric_sign([1, 2, 3])
1

Returns -1 when all argument items are negative:

>>> mathtools.get_shared_numeric_sign([-1, -2, -3])
-1

Returns 0 on empty argument:

>>> mathtools.get_shared_numeric_sign([])
0

Otherwise returns none:

>>> mathtools.get_shared_numeric_sign([1, 2, -3]) is None
True

Returns 1, -1, 0 or none.