[SciPy-Dev] [PATCH] proper broadcasting for epsilon in scipy.optimize.approx_fprime()

Fabian Pedregosa fabian.pedregosa@inria...
Thu Sep 15 05:42:00 CDT 2011


On Wed, Sep 14, 2011 at 7:29 PM, Maxim Ivanov <maxim.ivanov@viewdle.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
> parameter.

Hi Maxim.

Thanks for the patch, I could apply it to current master and made a
pull request out of it:

https://github.com/scipy/scipy/pull/80

Hopefully people with more experience than me can comment on it.

Best,

Fabian


More information about the SciPy-Dev mailing list