(ctx, x)
Return *True* if the absolute value of *x* is infinite;
        otherwise return *False*::

            >>> from sympy.mpmath import *
            >>> isinf(inf)
            True
            >>> isinf(-inf)
            True
            >>> isinf(3)
            False
            >>> isinf(3+4j)
            False
            >>> isinf(mpc(3,inf))
            True
            >>> isinf(mpc(inf,3))
            True
Return *True* if the absolute value of *x* is infinite;
        otherwise return *False*::
Return * True * if the absolute value of * x * is infinite ; otherwise return * False * ::
def isinf(ctx, x):
        """
        Return *True* if the absolute value of *x* is infinite;
        otherwise return *False*::

            >>> from sympy.mpmath import *
            >>> isinf(inf)
            True
            >>> isinf(-inf)
            True
            >>> isinf(3)
            False
            >>> isinf(3+4j)
            False
            >>> isinf(mpc(3,inf))
            True
            >>> isinf(mpc(inf,3))
            True

        """
        if hasattr(x, "_mpf_"):
            return x._mpf_ in (finf, fninf)
        if hasattr(x, "_mpc_"):
            re, im = x._mpc_
            return re in (finf, fninf) or im in (finf, fninf)
        if isinstance(x, int_types) or isinstance(x, rational.mpq):
            return False
        x = ctx.convert(x)
        if hasattr(x, '_mpf_') or hasattr(x, '_mpc_'):
            return ctx.isinf(x)
        raise TypeError("isinf() needs a number as input")
def isinf ( ctx , x ) : if hasattr ( x , "_mpf_" ) : return x . _mpf_ in ( finf , fninf ) if hasattr ( x , "_mpc_" ) : re , im = x . _mpc_ return re in ( finf , fninf ) or im in ( finf , fninf ) if isinstance ( x , int_types ) or isinstance ( x , rational . mpq ) : return False x = ctx . convert ( x ) if hasattr ( x , '_mpf_' ) or hasattr ( x , '_mpc_' ) : return ctx . isinf ( x ) raise TypeError ( "isinf() needs a number as input" )