How to convert class 'sympy.core' to 'number' or 'float' for optimization?
问题 I'm a Python initiator and I'd like to solve the following problems, but I don't know what the cause is.I approached the problem using 'fsolve' an optimization tool. First of all, I'm trying to solve a nonlinear equation, but I've approached it in two cases. One case worked out well. But I can't find another case. First case (complete case) from sympy import * from scipy.optimize import fsolve import numpy as np y= symbols('y') b_1, b_2 = symbols ('b_1,b_2') b = 1 f = b_1 + b_2*(y/b)**2 K1 =