friendlysam.opt.Sum.create

classmethod Sum.create(*args)

Classmethod to create a new Sum object.

Note that create() has a different signature than the constructor. The constructor takes an iterable as only argument, but create() takes a list of arguments.

Example

>>> x = VariableCollection('x')
>>> terms = [x(i) for i in range(4)]
>>> Sum(terms) == Sum.create(*terms)
True