How to evaluate system of equations in Sympy? -
i have next scheme of equations
from sympy.abc import x,y,z sympy import solve, eq eqs = [eq(x,y), eq(y,z)] result = solve(eqs, x)
now want able substitute value z
, evaluate x
. how can that?
you should include 2 variables want solve after eqs , proceed follows:
>>> result = solve(eqs, x, y) >>> result[x].subs(z,42) 42
sympy
No comments:
Post a Comment