[AstroPy] astropy.modeling bug

Charles Finn c.w.finn2301 at gmail.com
Fri Aug 15 06:36:34 EDT 2014


Hi all,

While using astropy.modeling I’ve noticed a bug. The keyword argument ‘weights’, passed to a __call__ method in any of the astropy.modeling.fitting classes that use scipy.optimize.leastsq does not work as it should. This is because the args keyword in leastsq should be passed a tuple with items in the order (xdata, ydata, zdata, model, weights), whereas the _wrap_deriv method arranges that tuple in the order (model, weights, xdata, ydata, zdata).

I’ve made a quick fix to the astropy build on my machine, and making the change described above fixes the problem. However, I’m not a contributor to the code, so I thought I would flag the issue here for someone more experienced than me to fix!

Best regards,

Charles

--
Charles William Finn
Postgraduate Researcher in Astrophysics

Extragalactic Astronomy & Cosmology Group
Department of Physics
Durham University
South Road
Durham DH1 3LE
United Kingdom

Email: c.w.finn at durham.ac.uk
Website: http://www.dur.ac.uk/c.w.finn/
Tel: +44 (191) 33 43517



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20140815/60b7ccd6/attachment.html>


More information about the AstroPy mailing list