Dear all,
So I'm trying to use Sympy to solve a simple system with indexed symbols,
something like this:
Eq 1. y[i] = sqrt(x[i])
Eq 2. m = Sum(z[i] * y[i], (i, 0, n)) / Sum(x[i], (i, 0, n))
where, *x, y, z, i, n and m* are symbols (x, y and z are *IndexedBase* and
i is *Idx*, n and m are *Symbol*).
Now given each x[i], n and z[i], I'd like to lambdify a callable function
to evaluate m, how can I achieve this?
Issue with my attempt: I tried using *solve([Eq1, Eq2])* to generate a
symbolic solution for m first, but it seems that y[i] is not resolved as
sqrt(x[i]) but kept in its original form y[i].
Any help is appreciated!
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/470f6d1b-534e-47ad-87a3-acdab0362b3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.