(self)
Compute the radius of convergence of the defining series.

        Note that even if this is not oo, the function may still be evaluated
        outside of the radius of convergence by analytic continuation. But if
        this is zero, then the function is not actually defined anywhere else.

        >>> from sympy.functions import hyper
        >>> from sympy.abc import z
        >>> hyper((1, 2), [3], z).radius_of_convergence
        1
        >>> hyper((1, 2, 3), [4], z).radius_of_convergence
        0
        >>> hyper((1, 2), (3, 4), z).radius_of_convergence
        oo
Compute the radius of convergence of the defining series.
Compute the radius of convergence of the defining series .
def radius_of_convergence(self):
        """
        Compute the radius of convergence of the defining series.

        Note that even if this is not oo, the function may still be evaluated
        outside of the radius of convergence by analytic continuation. But if
        this is zero, then the function is not actually defined anywhere else.

        >>> from sympy.functions import hyper
        >>> from sympy.abc import z
        >>> hyper((1, 2), [3], z).radius_of_convergence
        1
        >>> hyper((1, 2, 3), [4], z).radius_of_convergence
        0
        >>> hyper((1, 2), (3, 4), z).radius_of_convergence
        oo
        """
        if any(a.is_integer and (a <= 0) == True for a in self.ap + self.bq):
            aints = [a for a in self.ap if a.is_Integer and (a <= 0) == True]
            bints = [a for a in self.bq if a.is_Integer and (a <= 0) == True]
            if len(aints) < len(bints):
                return S(0)
            popped = False
            for b in bints:
                cancelled = False
                while aints:
                    a = aints.pop()
                    if a >= b:
                        cancelled = True
                        break
                    popped = True
                if not cancelled:
                    return S(0)
            if aints or popped:
                # There are still non-positive numerator parameters.
                # This is a polynomial.
                return oo
        if len(self.ap) == len(self.bq) + 1:
            return S(1)
        elif len(self.ap) <= len(self.bq):
            return oo
        else:
            return S(0)
def radius_of_convergence ( self ) : if any ( a . is_integer and ( a <= 0 ) == True for a in self . ap + self . bq ) : aints = [ a for a in self . ap if a . is_Integer and ( a <= 0 ) == True ] bints = [ a for a in self . bq if a . is_Integer and ( a <= 0 ) == True ] if len ( aints ) < len ( bints ) : return S ( 0 ) popped = False for b in bints : cancelled = False while aints : a = aints . pop ( ) if a >= b : cancelled = True break popped = True if not cancelled : return S ( 0 ) if aints or popped : # There are still non-positive numerator parameters. # This is a polynomial. return oo if len ( self . ap ) == len ( self . bq ) + 1 : return S ( 1 ) elif len ( self . ap ) <= len ( self . bq ) : return oo else : return S ( 0 )