-
Notifications
You must be signed in to change notification settings - Fork 6
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: Fixing time selection when precision is different #344
Conversation
…re not the same. By default, the lowest precision should be used to determine if time data intersects.
Note, this change is required to have the SMAP EGI node work when requesting data for a single date. |
I want to look at this more closely later this afternoon. I think this makes sense. Leaving myself a note to double check - I think we may only want the lower precision in one direction, that is, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converting my_bounds
to the precision of the input bounds makes sense to me in general. I think that's what a naive user would expect using the select
method.
* factored out the lowering of the precision to a function * Only do this selection when outer==True for higher precision other (compared to inner) * Check for self.dtype instead of self.name * Check input bound dtypes and throw TypeError if anything is not a np.datetime64
Ok @jmilloy . I made those changes. Please merge when you're happy. |
…dinates are empty (and dtype is None), and removes the (redundant) bounds type checking in the private _select method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed another tweak that always checks the bounds dtype. Looks good.
Consider:
With this PR, I propose that c12 and c21 should contain an intersection.