How to force the functions of the optimize module of scipy to take a function and its gradient simultaneously
The scipy.optimize.minimize methods has a parameter called "jac". If set to True, minimize will expect the callable f(x) to both return the function value and it's derivatives.
I have a fairly complex function f(x) that I want to optimize and I am using the fmin_bfgs function from the scipy.optimize module from Scipy. It forces  me to give the function to minimize and the function of the gradient f'(x) separately, which is a pity because some of the computations for the gradient can be done when evaluating the function f(x). 
Is there a way of combining both functions? I was considering saving the intermediate values required for both functions, but I don't know if the fmin_bfgs function guarantees that f(x) is evaluated before than f'(x).
Thank you