[SciPy-Dev] Changes to fsolve interface to match recent changes to leastsq interface
Thu Jun 24 09:24:10 CDT 2010
On Wed, Jun 23, 2010 at 10:02 AM, Charles R Harris <
> On Tue, Jun 22, 2010 at 7:47 PM, Travis Oliphant <firstname.lastname@example.org>wrote:
>> Hi all,
>> This is a heads-up in case there are concerns that I recently checked in
>> (to both trunk and 0.8.x branch) a small one-line change to fsolve to mirror
>> the change that was made to leastsq which removes the special-case handling
>> of one-variable problems.
>> The effect is to ensure that both fsolve and leastsq will continue to have
>> the same interface which now requires less special-case handling because it
>> always returns an array of length 1.
>> Thanks for making that consistent Travis. All your changes to fsolve and
curve_fit look good, the one minor nitpick I have is that your tests should
use numpy.testing.assert_ instead of plain assert.
> This is a relatively small, but real semantic change. While most code
>> will not be bothered by length-1 arrays instead of scalars being returned
>> from fsolve and leastsq for the 1-variable case, it does represent a bit of
>> a change and so should be stated in the release notes.
>> The change to leastsq fixes a problem with curve_fit and also arguably
>> simplifies the leastsq API.
> I think the change should to be documented in both the function and the
> release notes, probably with version info in the case of the function.
> The function already documented the new behavior (so old behavior could be
considered a bug). I'll make sure it's in the release notes.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-Dev