scipy.solve_ivp TypeError: float() argument must be a string or a real number, not 'function'
I am trying to use solve_ivp on a function with multiple variables that I had to define using sympy and convert to function with lambdify. The error looks like it might be similar to this post, but I cannot easily convert these lambda functions into normal functions, which was the solution there. I have the initial values and t_eval array evaluated earlier in the script. import sympy.utilities.lambdify as lambdify f_H2 = lambdify([H2,H2O,CO,CO2],r_H2) f_CO = lambdify([H2,H2O,CO,CO2],r_CO) f_H2O = lambdify([H2,H2O,CO,CO2],r_H2O) f_CO2 = lambdify([H2,H2O,CO,CO2],r_CO2) def func(t,y): H2,H2O,CO,C
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.