I am new to scipy, and the following code doesn't seem to work:
from scipy import optimize
def f(x, y):
return x * x - 3 + y
def main():
x0 = 0.1
y = 1
res = optimize.newton(f(x0,y), x0)
print (res)
The error I receive is:
File "C:\Python27\lib\site-packages\scipy\optimize\zeros.py", line 144, in newton
q0 = func(*((p0,) + args))
TypeError: 'float' object is not callable