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 bugs with evaluating models that accept no inputs. #3772

Merged
merged 3 commits into from
May 14, 2015

Conversation

embray
Copy link
Member

@embray embray commented May 13, 2015

Fixes an issue pointed out by @wkerzendorf, where models with zero inputs did not work. Incidentally the fix is almost exactly the one he put in temporarily. Just fixed it in another case as well.

@embray embray added this to the v1.0.3 milestone May 13, 2015
embray added a commit to embray/astropy that referenced this pull request May 13, 2015
@embray embray force-pushed the modeling/fix-inputless-model branch from 95c95e9 to 8e1af77 Compare May 13, 2015 20:09
@wkerzendorf
Copy link
Member

I now get a problem with

2294                 outputs[idx] = np.asscalar(output)

and output is an array. I wonder if these are related.

@embray
Copy link
Member Author

embray commented May 13, 2015

Ah, I thought I had that case covered, but it turns out I didn't. I've extended the test to check more possibilities, and fixed the issue.

@wkerzendorf
Copy link
Member

that did it! thanks @embray

@wkerzendorf
Copy link
Member

it's quite a bit slower than my solution - I'll checkout what is going on.

@embray
Copy link
Member Author

embray commented May 14, 2015

Could you quantify that? What exactly is slower and by how much? There's nothing about this change that is at all computationally expensive unless you have some enormous number of outputs.

@wkerzendorf
Copy link
Member

@embray nevermind, must have been something on my side! Anyways, thanks a lot this is great and from my side definitely ready to be merged.

embray added a commit that referenced this pull request May 14, 2015
Fix bugs with evaluating models that accept no inputs.
@embray embray merged commit 10abc6a into astropy:master May 14, 2015
@embray embray deleted the modeling/fix-inputless-model branch May 14, 2015 21:21
embray added a commit that referenced this pull request May 28, 2015
Fix bugs with evaluating models that accept no inputs.
dhomeier pushed a commit to dhomeier/astropy that referenced this pull request Aug 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants