def square(x, a=1):
    return [np.sum(x ** 2 + a), 2 * x]
a = np.arange(1, 11)
x = np.empty(len(a))
x[:] = 25
args = [a]
res = optimize.minimize(square, x, method='BFGS', jac=True, args=args)
Parallel optimizations in SciPy