friendlysam.opt.Eq.create

Eq.create(*args)

Classmethod to create a new object.

This method is the default evaluator function used in evaluate(). Usually you don’t want to use this function, but instead the constructor.

Parameters:*args – The arguments the operation operates on.

Examples

>>> x = Variable('x')
>>> args = (2, x)
>>> Add.create(*args) == 2 + x
True
>>> LessEqual.create(*args) == (2 <= x)
True