[SciPy-Dev] [PATCH] proper broadcasting for epsilon in scipy.optimize.approx_fprime()
Thu Sep 15 05:42:00 CDT 2011
On Wed, Sep 14, 2011 at 7:29 PM, Maxim Ivanov <email@example.com> wrote:
> Hi SciPy developers!
> Many of the functions in scipy.optimize module (e.g. fmin_bfgs) accept
> the 'epsilon' parameter, which is meant to be the step size coefficient.
> For multidimensional optimization one may want to set different values
> of the coefficient for different dimensions. But, at least in 0.8, the
> fmin_bfgs function, contrary to what its docs say, can't handle vectors
> as epsilon argument, only scalars work.
> The patch which I'm submitting uses Numpy broadcasting for the purpose
> of accepting both scalars AND vectors of appropriate size as the epsilon
Thanks for the patch, I could apply it to current master and made a
pull request out of it:
Hopefully people with more experience than me can comment on it.
More information about the SciPy-Dev