(f, allow_hyper=False, rewrite='default')
return f.replace(hyper, do_replace).replace(meijerg, do_meijer)
Expand hypergeometric functions. If allow_hyper is True, allow partial
    simplification (that is a result different from input,
    but still containing hypergeometric functions).

    Examples
    ========

    >>> from sympy.simplify.hyperexpand import hyperexpand
    >>> from sympy.functions import hyper
    >>> from sympy.abc import z
    >>> hyperexpand(hyper([], [], z))
    exp(z)

    Non-hyperegeometric parts of the expression and hypergeometric expressions
    that are not recognised are left unchanged:

    >>> hyperexpand(1 + hyper([1, 1, 1], [], z))
    hyper((1, 1, 1), (), z) + 1
Expand hypergeometric functions. If allow_hyper is True, allow partial
    simplification (that is a result different from input,
    but still containing hypergeometric functions).
Expand hypergeometric functions . If allow_hyper is True allow partial simplification ( that is a result different from input but still containing hypergeometric functions ) .
def hyperexpand(f, allow_hyper=False, rewrite='default'):
    """
    Expand hypergeometric functions. If allow_hyper is True, allow partial
    simplification (that is a result different from input,
    but still containing hypergeometric functions).

    Examples
    ========

    >>> from sympy.simplify.hyperexpand import hyperexpand
    >>> from sympy.functions import hyper
    >>> from sympy.abc import z
    >>> hyperexpand(hyper([], [], z))
    exp(z)

    Non-hyperegeometric parts of the expression and hypergeometric expressions
    that are not recognised are left unchanged:

    >>> hyperexpand(1 + hyper([1, 1, 1], [], z))
    hyper((1, 1, 1), (), z) + 1
    """
    f = sympify(f)

    def do_replace(ap, bq, z):
        r = _hyperexpand(Hyper_Function(ap, bq), z, rewrite=rewrite)
        if r is None:
            return hyper(ap, bq, z)
        else:
            return r

    def do_meijer(ap, bq, z):
        r = _meijergexpand(G_Function(ap[0], ap[1], bq[0], bq[1]), z,
                           allow_hyper, rewrite=rewrite)
        if not r.has(nan, zoo, oo, -oo):
            return r
    return f.replace(hyper, do_replace).replace(meijerg, do_meijer)
def hyperexpand ( f , allow_hyper = False , rewrite = 'default' ) : f = sympify ( f ) def do_replace ( ap , bq , z ) : r = _hyperexpand ( Hyper_Function ( ap , bq ) , z , rewrite = rewrite ) if r is None : return hyper ( ap , bq , z ) else : return r def do_meijer ( ap , bq , z ) : r = _meijergexpand ( G_Function ( ap [ 0 ] , ap [ 1 ] , bq [ 0 ] , bq [ 1 ] ) , z , allow_hyper , rewrite = rewrite ) if not r . has ( nan , zoo , oo , - oo ) : return r return f . replace ( hyper , do_replace ) . replace ( meijerg , do_meijer )