I am trying to bind to a given function using Scipy. Scipy.optimize.leastsq needs a vector function as one of the input parameters. All this works fine, but now I have a more complex function that is not automatically Scipy / Numpy vectorized.
def f1(a, parameters):
b, c = parameters
result = scipy.integrate.quad(integrand, lower, upper, (a, b, c))
return result
or give a private example numpy.vectorize also does not work with
def f2(a, parameters):
b, c = parameters
return a+b+c
Is it possible to vectorize these functions in Scipy / Numpy?
Thanks for any help! Alexander
source
share