[SciPy-dev] scipy.optimize.nonlin.broyden2

Ondrej Certik ondrej@certik...
Thu Mar 20 07:45:10 CDT 2008

On Thu, Mar 20, 2008 at 4:11 AM, argriffi <argriffi@ncsu.edu> wrote:
> Hi Ondrej,
>  As requested I have attached a modification and a test case.  The
>  modification checks a value for equality to zero, but maybe it should
>  more appropriately handle values near zero.  Also, other functions in
>  nonlin.py may benefit from similar modifications.

Excellent, thanks a lot for the work. Here are my comments:

               denominator = norm(deltaFxm)**2
               if not denominator:

use abs(denominator) < eps

and define eps as a default parameter of the function, for example eps=1e-10.

Also could you please apply this into the scipy svn, and send use the
output of "svn di"? So that someone with a svn access can just take it
and apply it.

As to the tests, please add them to
scipy/optimize/tests/test_nonlin.py. Simply do all of this in your
local svn copy and send use the result of "svn di".

Thanks very much,

More information about the Scipy-dev mailing list