(f)
A tuple containing leading degrees in all variables.

        Note that the degree of 0 is negative infinity (the SymPy object -oo)
A tuple containing leading degrees in all variables.
A tuple containing leading degrees in all variables .
def degrees(f):
        """
        A tuple containing leading degrees in all variables.

        Note that the degree of 0 is negative infinity (the SymPy object -oo)

        """
        if not f:
            return (-oo,)*f.ring.ngens
        else:
            return tuple(map(max, list(zip(*f.itermonoms()))))
def degrees ( f ) : if not f : return ( - oo , ) * f . ring . ngens else : return tuple ( map ( max , list ( zip ( * f . itermonoms ( ) ) ) ) )