I\'m trying to optimize a function with N variables (where N is circa 10 ), I already computed the gradient vector and hessian matrix and tried to use scipy.optimize.minimiz