Python Forum
How can I put an np.arange in equation's solution? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: How can I put an np.arange in equation's solution? (/thread-14019.html)



How can I put an np.arange in equation's solution? - pianistseb - Nov-11-2018

How can I fix the issue in this code? It says "can't initialize from 'list' without generators". Thank for your help!
from sympy.solvers import solve
from sympy import Symbol
from sympy import solve, Poly, Eq, Function, exp
from sympy.abc import x, y, z, a, b

def f(x,y):
return solve(Poly(x**2*y+(23+y)*x+y**2),y)

x=np.arange(-20,20,0.1)
y=2

print(f(x,y))



RE: How can I put an np.arange in equation's solution? - SheeppOSU - Nov-11-2018

I'm pretty sure it's the spacing. Press tab on the beginning of line 7 to space it correctly


RE: How can I put an np.arange in equation's solution? - pianistseb - Nov-11-2018

Even I put the tab, the problem remains.


RE: How can I put an np.arange in equation's solution? - SheeppOSU - Dec-22-2018

What exactly is this supposed to do