jjhelmus / leastsqbound-scipy

Constrained multivariate least-squares optimizer for scipy
Other
21 stars 8 forks source link

fix analytic jacobian for col_deriv=1 #8

Closed newville closed 9 years ago

newville commented 9 years ago

The solution in PR #7 works only for row-based Jacobians, not with col_deriv=1. This PR checks col_deriv in the wrapped jacobian, and reshapes the internal-to-external gradient appropriately.

An example script is at https://gist.github.com/newville/09747a8d09ad71efb1ed

jjhelmus commented 9 years ago

Looks good @newville, thanks for the fix.