[Scipy-tickets] [SciPy] #637: [patch] scipy.optimize.leastsq() unit tests, including one revealing a bug

SciPy scipy-tickets@scipy....
Sat Apr 12 22:56:00 CDT 2008


#637: [patch] scipy.optimize.leastsq() unit tests, including one revealing a bug
----------------------------+-----------------------------------------------
 Reporter:  AndrewStraw     |       Owner:  somebody
     Type:  defect          |      Status:  new     
 Priority:  normal          |   Milestone:  0.7     
Component:  scipy.optimize  |     Version:          
 Severity:  normal          |    Keywords:          
----------------------------+-----------------------------------------------
 I wrote a few unit tests for leastsq(), including one which reveals a bug.

 The bug, shown in the test test_input_untouched(), is that input parameter
 arrays are modified by the function call. A trivial fix is to copy the
 array after atleast_1d() is called. I also submit a patch to fix this bug.

 A sub-optimality of my fix is that 2 copies of the data are potentially
 made -- one for atleast_1d() and one for the explicit copy. This could be
 fixed if atleast_1d() was modified to have an option to force a copy.

-- 
Ticket URL: <http://scipy.org/scipy/scipy/ticket/637>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list