Is there a way to "quietly" use scipy.optimize.fmin? That is, that it does not print e.g.
Optimization terminated successfully.
Current function value: 0.000000
Iterations: 13
Function evaluations: 30
when running the code?
This could be useful in e.g. loops that last a for a while.
fmin() function is used to compute element-wise minimum of array elements. This function compare two arrays and returns a new array containing the element-wise minima. If one of the elements being compared is a NaN, then the non-nan element is returned. If both elements are NaNs then the first is returned.
Objective functions in scipy. optimize expect a numpy array as their first parameter which is to be optimized and must return a float value. The exact calling signature must be f(x, *args) where x represents a numpy array and args a tuple of additional arguments supplied to the objective function.
Setting the argument disp=False
stops scipy.optimize.fmin
from printing messages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With