Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Handling of np.datetime64 and other scalar objects that have __getitem__ attribute in _eval_blocks() #377

Merged
merged 3 commits into from
Mar 29, 2018

Conversation

apalepu23
Copy link
Contributor

The __eval_blocks() function in chunked_eval.py mishandles np.datetime64 objects since they for some reason have the getitem attribute. This fix should allow users to use ctable.fetchwhere() functions off of datetime queries.

…em__ attribute - we first check if np.isscalar is true, then if __getitem__ attr is satisfied, and then all other conditions.
@coveralls
Copy link

coveralls commented Mar 29, 2018

Coverage Status

Coverage increased (+0.08%) to 65.353% when pulling 475f9e1 on apalepu23:master into cee4072 on Blosc:master.

@FrancescAlted
Copy link
Member

Your patch looks good to me. Could you please add a test unit for the new np.datetime64 support?

@apalepu23
Copy link
Contributor Author

apalepu23 commented Mar 29, 2018

Added a test (test06) as part of the fetchwhereTest class and confirmed that it works as expected. Thanks!

@apalepu23
Copy link
Contributor Author

Removed some unused code in the test, now it should be all set - thanks!

@FrancescAlted
Copy link
Member

Excellent. Thank you!

@FrancescAlted FrancescAlted merged commit 2cdcd0f into Blosc:master Mar 29, 2018
@apalepu23
Copy link
Contributor Author

Thanks Francesc - any idea when this might be released to be pip installable for others on the team needing this? No rush, just wondering thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants