I am trying to minimize a function using scipy.optimize. Here is my programme and the last line is the error message.
import sympy as s
from scipy.optimize import minimize
x,y,z=s.symbols('x y z')
f= lambda z: x**2-y**2
bnds = ((70,None),(4,6))
res = minimize(lambda z: fun(*x),(70,4), bounds=bnds)
<lambda>() argument after * must be an iterable, not Symbol
How to convert symbol to an iterable or define an iterable directly ?