Any insight into the following will be greatly appreciated. Many thanks.
from sympy import *
x = symbols('x', integer=True)
def main(fns, q0):
for fn in fns:
print(fn)
print(fn.subs([x,q0]))
if __name__ == '__main__':
f1=x
f2=x+2
main([f1,f2], 3)
yields
x
Yep. Thanks much, Sudhanshu
Cheers, Scott
On Tuesday, March 24, 2015 at 5:44:47 PM UTC-4, Sudhanshu Mishra wrote:
Hi Scott,
It looks like your subs call is wrong. It should be fn.subs(x, q0)
Hope this helps.
Sudhanshu Mishra
On Wed, Mar 25, 2015 at 3:06 AM, Scott Guthery sgut