I try with fmin_bfgs to find the local minimum of the absolute function abs(x)
. The initial point is set to 100.0; the expected answer is 0.0. However, I get:
In [184]: op.fmin_bfgs(lambda x:np.abs(x),100.0)
Warning: Desired error not necessarily achieved due to precision loss.
Current function value: 100.000000
Iterations: 0
Function evaluations: 64
Gradient evaluations: 20
Out[184]: array([100.0])
Why?