(f)
return tdeg
Returns the homogeneous order of ``f``.
Returns the homogeneous order of ``f``.
Returns the homogeneous order of f .
def homogeneous_order(f):
        """Returns the homogeneous order of ``f``. """
        if f.is_zero:
            return -oo

        monoms = f.monoms()
        tdeg = sum(monoms[0])

        for monom in monoms:
            _tdeg = sum(monom)

            if _tdeg != tdeg:
                return None

        return tdeg
def homogeneous_order ( f ) : if f . is_zero : return - oo monoms = f . monoms ( ) tdeg = sum ( monoms [ 0 ] ) for monom in monoms : _tdeg = sum ( monom ) if _tdeg != tdeg : return None return tdeg