-
Notifications
You must be signed in to change notification settings - Fork 44
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
Explicit error when coordinates are not numercial #190
Conversation
grosse MAJ xrft
@roxyboy The checks do not seem to be processed. Any idea why ? |
Hi @roxyboy , |
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.
These edits look good, thanks :) Regarding the stalled tests, I did take a look at the link but I couldn't seem to understand the fix... I've asked an expert so hopefully he'll reply soon.
Thanks for looping me in here @roxyboy! I've been digging around on SO and the best guess I have so far, based on this post, is that perhaps the fact that this PR's first commit was a |
🤔 Ok that did not seem to work... |
@roxyboy and I are coordinating offline on this... he has just removed the requirement in the repo settings that status checks must pass before a PR is merged. From further reading on Stack Overflow it seems this requirement can sometimes interfere with CI running, as we are observing here. I will now close and re-open this PR to re-trigger CI. |
Ah ok, sorry then Ill close #193 |
For the future, should I just keep "Require status checks to pass" unchecked..? |
@roxyboy I think this is the easiest path forward for now, yes. |
@lanougue It seems that the tests are failing from |
@roxyboy I think this is it ! |
( | ||
is_numeric_dtype(da.coords[d]) | ||
or is_datetime64_any_dtype(da.coords[d]) | ||
or bool(getattr(da.coords[d][0].item(), "calendar", False)) |
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.
@lanougue Could you explain what this new condition is for with the calendar...?
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.
xrft.fft can do Fourier Transforms on data with coordinates being of dtype "cftime" (some kind of temporal data with a defined calendar). In the test_xrft.py file, we have some checks with this kind of coordinates with "julian", "365_day", "360_day" type of calendar.
When coordinates are of cftime type, the returned dtype is "object" which is not considered as "numerical" or "datetime" by pandas API. It is thus needed to have some special test to accept this kind of data if we want to pass the checks.
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.
Ok, sounds good. I'll go ahead and merge this :)
No description provided.