-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Use numpy & dask sliding_window_view for rolling #4977
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
Conversation
@@ -29,38 +29,3 @@ def test_vindex(): | |||
vindex[[0, 1], [0, 1], :] = vindex[[0, 1], [0, 1], :] | |||
vindex[[0, 1], :, [0, 1]] = vindex[[0, 1], :, [0, 1]] | |||
vindex[:, [0, 1], [0, 1]] = vindex[:, [0, 1], [0, 1]] | |||
|
|||
|
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.
moved to test_variable
|
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 didn't do a thorough review, but I have a few comments.
sliding_window_view
dispatches with array_function
yes, this is really great.
…indow * upstream/master: add polyval to polyfit see also (pydata#5020) mention map_blocks in the docstring of apply_ufunc (pydata#5011) Switch backend API to v2 (pydata#4989) WIP: add new backend api documentation (pydata#4810) pin netCDF4=1.5.3 in min-all-deps (pydata#4982) fix matplotlib errors for single level discrete colormaps (pydata#4256) Adapt exception handling in CFTimeIndex.__sub__ and __rsub__ (pydata#5006) Update options.py (pydata#5000) Adjust tests to use updated pandas syntax for offsets (pydata#4537) add a combine_attrs parameter to Dataset.merge (pydata#4895) Support for dask.graph_manipulation (pydata#4965) raise on passing axis to Dataset.reduce methods (pydata#4940)
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.
Looks good. I am still interested to eventually fix #2007. This PR may also make that easier as it now uses Variable.pad
.
Co-authored-by: Mathias Hauser <[email protected]>
That's the goal i.e. make it easier to fix #2007 and minimize number of code paths for rolling. This PR reduces the number of places we call |
Co-authored-by: Mathias Hauser <[email protected]>
…indow * upstream/master: Fix regression in decoding large standard calendar times (pydata#5050) Fix sticky sidebar responsiveness on small screens (pydata#5039) Flexible indexes refactoring notes (pydata#4979) add a install xarray step to the upstream-dev CI (pydata#5044) Adds Dataset.query() method, analogous to pandas DataFrame.query() (pydata#4984) run tests on python 3.9 (pydata#5040) Add date attribute to datetime accessor (pydata#4994) 📚 New theme & rearrangement of the docs (pydata#4835) upgrade ci-trigger to the most recent version (pydata#5037) GH5005 fix documentation on open_rasterio (pydata#5021) GHA for automatically canceling previous CI runs (pydata#5025) Implement GroupBy.__getitem__ (pydata#3691) conventions: decode unsigned integers to signed if _Unsigned=false (pydata#4966) Added support for numpy.bool_ (pydata#4986) Add additional str accessor methods for DataArray (pydata#4622)
…nto rolling-sliding-window * 'rolling-sliding-window' of github.com:dcherian/xarray: Update xarray/core/npcompat.py Apply suggestions from code review
The dask PR was merged so this should be ready to go. |
It looked pretty good when I reviewed it, so 👍 Just quickly skimming the code it did not become entirely clear to me why this had to be after dask/dask#7234? You don't import |
haha. fixed! I was waiting on that PR to see if the reviews would catch any bugs. |
@dcherian, should we test this in upstream-dev CI workflow (via the |
d7c37a7
to
39f9e28
Compare
thanks @andersy005 ! |
Should merge after dask/dask#7234 is merged
pre-commit run --all-files
whats-new.rst