@public
def decompose(f, *gens, **args):
 options.allowed_flags(args, ['polys'])
 try:
  (F, opt) = poly_from_expr(f, *gens, **args)
 except PolificationFailed as exc:
  raise ComputationFailed('decompose', 1, exc)
 result = F.decompose()
 if (not opt.polys):
  return [r.as_expr() for r in result]
 else:
  return result

@ public def decompose ( f , * gens , ** args ) : options . allowed_flags ( args , [ 'polys' ] ) try : ( F , opt ) = poly_from_expr ( f , * gens , ** args ) except PolificationFailed as exc : raise ComputationFailed ( 'decompose' , 1 , exc ) result = F . decompose ( ) if ( not opt . polys ) : return [ r . as_expr ( ) for r in result ] else : return result
compute functional decomposition of f .