@public
def sfield(exprs, *symbols, **options):
 single = False
 if (not is_sequence(exprs)):
  (exprs, single) = ([exprs], True)
 exprs = list(map(sympify, exprs))
 opt = build_options(symbols, options)
 numdens = []
 for expr in exprs:
  numdens.extend(expr.as_numer_denom())
 (reps, opt) = _parallel_dict_from_expr(numdens, opt)
 if (opt.domain is None):
  coeffs = sum([list(rep.values()) for rep in reps], [])
  (opt.domain, _) = construct_domain(coeffs, opt=opt)
 _field = FracField(opt.gens, opt.domain, opt.order)
 fracs = []
 for i in range(0, len(reps), 2):
  fracs.append(_field(tuple(reps[i:(i + 2)])))
 if single:
  return (_field, fracs[0])
 else:
  return (_field, fracs)

@ public def sfield ( exprs , * symbols , ** options ) : single = False if ( not is_sequence ( exprs ) ) : ( exprs , single ) = ( [ exprs ] , True ) exprs = list ( map ( sympify , exprs ) ) opt = build_options ( symbols , options ) numdens = [ ] for expr in exprs : numdens . extend ( expr . as_numer_denom ( ) ) ( reps , opt ) = _parallel_dict_from_expr ( numdens , opt ) if ( opt . domain is None ) : coeffs = sum ( [ list ( rep . values ( ) ) for rep in reps ] , [ ] ) ( opt . domain , _ ) = construct_domain ( coeffs , opt = opt ) _field = FracField ( opt . gens , opt . domain , opt . order ) fracs = [ ] for i in range ( 0 , len ( reps ) , 2 ) : fracs . append ( _field ( tuple ( reps [ i : ( i + 2 ) ] ) ) ) if single : return ( _field , fracs [ 0 ] ) else : return ( _field , fracs )
construct a field deriving generators and domain from options and input expressions .