What am i doing wrong here?
import numpy as np
import scipy.optimize as so
def f(z):
return z
guess=np.array([1,1])
z0=so.newton(f,guess)
Im getting the following error:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
There is some info on scipy docs about vectorizing the function if its domain is multivalued, but cant quite understand what i have to do.
z0 = array([0., 0.])), but not in python2.