def get_numbered_constants(eq, num=1, start=1, prefix='C'):
 if isinstance(eq, Expr):
  eq = [eq]
 elif (not iterable(eq)):
  raise ValueError(('Expected Expr or iterable but got %s' % eq))
 atom_set = set().union(*[i.free_symbols for i in eq])
 ncs = numbered_symbols(start=start, prefix=prefix, exclude=atom_set)
 Cs = [next(ncs) for i in range(num)]
 return (Cs[0] if (num == 1) else tuple(Cs))

def get_numbered_constants ( eq , num = 1 , start = 1 , prefix = 'C' ) : if isinstance ( eq , Expr ) : eq = [ eq ] elif ( not iterable ( eq ) ) : raise ValueError ( ( 'Expected Expr or iterable but got %s' % eq ) ) atom_set = set ( ) . union ( * [ i . free_symbols for i in eq ] ) ncs = numbered_symbols ( start = start , prefix = prefix , exclude = atom_set ) Cs = [ next ( ncs ) for i in range ( num ) ] return ( Cs [ 0 ] if ( num == 1 ) else tuple ( Cs ) )
returns a list of constants that do not occur in eq already .