Add 'assign' method to ease symbol substitution
Issue #81
resolved
Given a Lea instance using SymPy symbols,
x = lea.binom(2,'p') + lea.binom(2,'q')
the symbols can be replaced by actual values using the Lea.subs
method, which works as sympy.Expr.subs
method:
x.subs({'p': 0.8, 'q': 0.6})
It is proposed to add a new assign
method, so this can be done easier using keyword arguments:
x.assign(p=0.8, q=0.6)
Comments (2)
-
reporter -
reporter - changed status to resolved
Done in Lea 4
- Log in to comment
Add Lea.assign method, extend Lea.subs method, make misc minor fixes (refs
#81)→ <<cset 90cab01d5ab4>>