[AstroPy] astropy.modeling bug

Thomas Robitaille thomas.robitaille at gmail.com
Wed Aug 20 17:53:27 EDT 2014


Hi Charles,

(I replied over the weekend but the scipy servers were down, so emails
sent to the list in the last few days have been lost)

Charles Finn wrote:
> 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).

Could you report this issue here so that we can keep track of it?

https://github.com/astropy/astropy/issues

> 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!

Anyone can submit code contributions to Astropy, so you can learn to
become a contributor if you would like!  We have instructions here:

http://docs.astropy.org/en/stable/development/workflow/development_workflow.html

on how to open a 'pull request' on GitHub to suggest changes. Feel free
to give it a try and try submitting a patch for this issue!

Cheers,
Tom

> 
> 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 <mailto:c.w.finn at durham.ac.uk>
> Website: http://www.dur.ac.uk/c.w.finn/
> Tel: +44 (191) 33 43517
> 
> 
> 
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy



More information about the AstroPy mailing list