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

DM-13403: numpy types fail in butler dataIds #248

Merged
merged 3 commits into from Apr 2, 2020
Merged

Conversation

andy-slac
Copy link
Contributor

At least one database backend cannot handle numpy.int64 type which is
a subclass of numbers.Integral. This patch replaces all values of
Integral type in a DataCoordinate with ints.

timj and others added 3 commits April 1, 2020 13:17
At least one database backend cannot handle `numpy.int64` type which is
a subclass of `numbers.Integral`. This patch replaces all values of
Integral type in a DataCoordinate with ints.
@andy-slac andy-slac requested a review from TallJimbo April 2, 2020 00:02
Copy link
Member

@TallJimbo TallJimbo left a comment

Choose a reason for hiding this comment

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

Looks good. I approve of DataCoordinate.standardize as the place to put this - while there may be other ways one could pass numpy types into the database, that will cover all data IDs (and hence the vast majority of places one is likely to pass a numpy type), and it might save us from non-database trouble with instance(numpy.int64, int) being False in the future.

@andy-slac andy-slac merged commit f6eab08 into master Apr 2, 2020
@timj timj deleted the tickets/DM-13403 branch April 22, 2020 22:00
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

3 participants