Comment #4 on issue 4023 by [email protected]: solve provides the error:
sympy.polys.polyerrors.PolynomialError: only univariate polynomials are
allowed
http://code.google.com/p/sympy/issues/detail?id=4023
BTW, it is *much* faster to use nroots on a Poly instance than to use solve
and then numericaly evaluate the results. Since you have a purely nuerical
polynomial you might be much happier doing
eq =(
fit_c2[8]+E*eps_yieldplast+(fit_c2[7]-E)*y+fit_c2[6]*y**2+fit_c2[5]*y*
*3+fit_c2[4]*y**4+fit_c2[3]*y**5+fit_c2[2]*y**6+fit_c2[1]*y**7+fit_c2[0]*y**8)
p2 = solve(eq,y)
Poly(eq).nroots(3)
[-0.00445, -0.00796*I, 0.00796*I, 0.0135, 0.0157 - 0.0161*I, 0.0157 +
0.0161*I,
0.032 - 0.0078*I, 0.032 + 0.0078*I]
Generating those roots took less than a second whereas the solve process
(which only produces RootOf instances) takes a couple seconds itself. And
then numerically evaluating the results runs into some other issues, e.g.
it appears that trying to evaluate the RootOf solutions in p2 to a small
precision hangs, e.g.
p2 = solve(eq,y)
for ni in range(15,1,-1):
... print ni,p2[0].n(ni)
...
15 -0.00444924327715238
14 -0.0044492432771524
13 -0.004449243277152
12 -0.00444924327715
11 -0.0044492432772
10 -0.004449243277
9 -0.00444924328
8 <================hangs
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" 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 http://groups.google.com/group/sympy-issues.
For more options, visit https://groups.google.com/groups/opt_out.