Add 'assign' method to ease symbol substitution

Issue #81 resolved
Pierre Denis repo owner created an issue

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)

  1. Log in to comment