-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 time indexing regression in convert_calendar
#9192
Conversation
c939730
to
c538a23
Compare
See discussion in pydata#9138 This commit and pull request mostly serves as a staging group for a potential fix. Test with: ``` pytest xarray/tests/test_cftimeindex.py::test_cftime_noleap_with_str ```
30a01c8
to
0f1a5a2
Compare
The comment https://github.com/pydata/xarray/pull/9002/files#r1591214299 had the right intuition. The fastpath was the source of problems. Empirically, i tested to see if it had any effects on the internal benchmarks that brought me to introducing it and it seems it does not (we avoid pandas quite heavily due to slowdowns it introduces, our data access is quite regular). |
ps. i have visitors this week, so feel free to push to adjust anything you feel the need to change. |
Not saying anything should change here, just giving the results of the benchmark
|
@pydata/xarray who is the best person to review this? |
I believe the solution in #9138 (comment) is a better path |
Thanks for starting this @hmaarrfk—I went ahead and switched this to the approach suggested in #9138 (comment) and moved the test to @aulemahal it would be great if you could take a look at this to ensure the test coverage is adequate. Thanks! |
Thank you @spencerkclark glad this is moving forward! |
convert_calendar
Just reporting:
|
@spencerkclark This change and the tests look good to me! |
Thanks all! |
* main: exclude the bots from the release notes (pydata#9235) switch the documentation to run with `numpy>=2` (pydata#9177) `numpy` 2 compatibility in the iris code paths (pydata#9156) `numpy` 2 compatibility in the `netcdf4` and `h5netcdf` backends (pydata#9136) Fix time indexing regression in `convert_calendar` (pydata#9192) Use duckarray assertions in test_coding_times (pydata#9226) Use reshape and ravel from duck_array_ops in coding/times.py (pydata#9225) Cleanup test_coding_times.py (pydata#9223) Only use necessary dims when creating temporary dataarray (pydata#9206) Fix two bugs in DataTree.update() (pydata#9214) Use numpy 2.0-compat `np.complex64` dtype in test (pydata#9217)
See discussion in #9138
Fixes #9138
This commit and pull request mostly serves as a staging group for a potential fix.
Test with:
whats-new.rst
api.rst