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

Wrap test code objid in ints. #7

Merged
merged 1 commit into from Mar 6, 2017
Merged

Conversation

wmwv
Copy link
Contributor

@wmwv wmwv commented Mar 6, 2017

Numpy >=1.12 disallows float indexing.

@danielsf I've wrapped indexes in these test cases here, and the tests now pass.

But the real question is that given that the index used a lookup of the 'objid' column in the database, what other code in sims_catalogs or users of sims_catalogs have this indexing issue?

Numpy >=1.12 disallows float indexing.
Copy link
Collaborator

@danielsf danielsf left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this.

I think we should be safe against this failure spreading. As you say, line['id'] refers to the id column in the database. We don't usually index on that column, except in unit tests. I am also reasonably confident that the test coverage in sims_catalogs is good enough that, if this were a problem, we would have seen it in other unit tests than the one you are fixing.

@danielsf danielsf merged commit 50a5eaf into lsst-sims:master Mar 6, 2017
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.

None yet

2 participants