tracts.util.all_same_sign#
- all_same_sign(lst)#
Check whether all elements in a list have the same sign.
- Parameters:
lst (
list[Number]) – List of numeric values. Raises error if empty.- Returns:
Trueif all elements have the same sign as the first element,Falseotherwise.- Return type:
bool