Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scipy.fsolve failure when computing r0_500 #127

Merged
merged 1 commit into from
Sep 9, 2018
Merged

Conversation

jmeyers314
Copy link
Member

Fixes a bug where newer versions of scipy.fsolve (sensibly) require the output of the residual function to have the same dimensions as the input. We were previously producing a vector residual from a scalar input due to broadcasting the vector L0 parameter. This PR scalarizes the input L0, and also plays a bit more defensively against possible vector inputs that may, for instance, be employed by fsolve itself.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 70.874% when pulling 8ceeb7b on r0_500_fsolve into e311a5f on master.

Copy link
Collaborator

@jchiang87 jchiang87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We need these changes to run with lsst_sims 2.10.0.

@jchiang87
Copy link
Collaborator

I'll merge this tomorrow at 9am PT, unless I hear otherwise.

@cwwalter
Copy link
Member

cwwalter commented Sep 9, 2018

Ah, forgot to come back to this. Thanks Jim. Is the numpy version bumped in the latest release?

@jchiang87
Copy link
Collaborator

Yes, it's at numpy 1.14.5 in lsst_sims 2.10.0

@jchiang87 jchiang87 merged commit 759dda6 into master Sep 9, 2018
@jchiang87 jchiang87 deleted the r0_500_fsolve branch September 9, 2018 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants