def _hyper_to_meijerg(func):
 ap = func.ap
 bq = func.bq
 p = len(ap)
 q = len(bq)
 ispoly = any((((i <= 0) and (int(i) == i)) for i in ap))
 if ispoly:
  return hyperexpand(func)
 z = func.args[2]
 an = ((1 - i) for i in ap)
 anp = ()
 bm = (S(0),)
 bmq = ((1 - i) for i in bq)
 k = S(1)
 for i in bq:
  k = (k * gamma(i))
 for i in ap:
  k = (k / gamma(i))
 return (k * meijerg(an, anp, bm, bmq, (- z)))

def _hyper_to_meijerg ( func ) : ap = func . ap bq = func . bq p = len ( ap ) q = len ( bq ) ispoly = any ( ( ( ( i <= 0 ) and ( int ( i ) == i ) ) for i in ap ) ) if ispoly : return hyperexpand ( func ) z = func . args [ 2 ] an = ( ( 1 - i ) for i in ap ) anp = ( ) bm = ( S ( 0 ) , ) bmq = ( ( 1 - i ) for i in bq ) k = S ( 1 ) for i in bq : k = ( k * gamma ( i ) ) for i in ap : k = ( k / gamma ( i ) ) return ( k * meijerg ( an , anp , bm , bmq , ( - z ) ) )
converts a hyper to meijerg .