html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/pull/5603#issuecomment-885080322,https://api.github.com/repos/pydata/xarray/issues/5603,885080322,IC_kwDOAMm_X840wUEC,223250,2021-07-22T17:18:58Z,2021-07-22T17:18:58Z,CONTRIBUTOR,"> There was some discussion about syntax at the dev meeting today. There were multiple votes in favour of allowing full control of padding in the rolling object itself. So we could have
>
> 1. `.rolling(time=5, x=3, pad={""x"": {""mode"": ""wrap""}, ""time"": False})`, OR
> 2. `.rolling(time=5, x=3).pad({""x"": {""mode"": ""wrap""}, ""time"": False})`
FWIW, I think 1 would be more efficient (but perhaps harder to implement). With this one, the `DataArrayRolling` object is only created once, with all of the required information.
If 2 were implemented, what should the return value of the `.pad()` call be? Would it call `construct` on the `rolling` object and return a `DataArray`? Or would it return an updated `DataArrayRolling` object? Or would it be a new type entirely (e.g., `DataArrayPaddedRolling`)?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,944714417
https://github.com/pydata/xarray/pull/5603#issuecomment-883763039,https://api.github.com/repos/pydata/xarray/issues/5603,883763039,IC_kwDOAMm_X840rSdf,223250,2021-07-20T23:08:26Z,2021-07-20T23:08:26Z,CONTRIBUTOR,"Mentioned in one of the comments above, but I think I've reached about the amount of time that I can spend on this right now. If there are other minor changes, please do let me know. I can also back out the breaking change if desired (although that will probably take some commit surgery).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,944714417
https://github.com/pydata/xarray/pull/5603#issuecomment-883754891,https://api.github.com/repos/pydata/xarray/issues/5603,883754891,IC_kwDOAMm_X840rQeL,223250,2021-07-20T22:48:21Z,2021-07-20T22:48:21Z,CONTRIBUTOR,"> The code also introduces a problem, the following no longer works:
> ```
> xr.DataArray([1, 2, 3], coords=dict(x=[1, 1, 1])).rolling(x=3).mean()
> ```
> thus you may have to use `isel` instead of `sel` if possible. Therefore I was also unable to test the following (from #2007 (comment)):
>
> ```
> monthly.pad(month=n_months, mode=""wrap"").rolling(center=True, month=n_months, pad=False).mean(skipna=False)
> ```
Fixed and added a test for this. The example at the bottom now works.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,944714417
https://github.com/pydata/xarray/pull/5603#issuecomment-882856489,https://api.github.com/repos/pydata/xarray/issues/5603,882856489,IC_kwDOAMm_X840n1Ip,223250,2021-07-19T21:02:27Z,2021-07-19T21:02:27Z,CONTRIBUTOR,@dcherian Thank you for reviewing. I've started working through your comments.,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,944714417
https://github.com/pydata/xarray/pull/5603#issuecomment-881781419,https://api.github.com/repos/pydata/xarray/issues/5603,881781419,IC_kwDOAMm_X840juqr,223250,2021-07-17T00:16:18Z,2021-07-17T00:16:18Z,CONTRIBUTOR,"Also, FWIW, the test failure was caused by a problem in zarr/fsspec (https://github.com/intake/filesystem_spec/issues/707), which is fixed in master on fsspec (https://github.com/intake/filesystem_spec/pull/710).
So it should be fixed here whenever fsspec makes a release.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,944714417
https://github.com/pydata/xarray/pull/5603#issuecomment-881773236,https://api.github.com/repos/pydata/xarray/issues/5603,881773236,IC_kwDOAMm_X840jsq0,223250,2021-07-16T23:41:55Z,2021-07-16T23:41:55Z,CONTRIBUTOR,"@dcherian Okay, I think this is in good shape. I added some more tests, and fixed a few more bugs. Most of the fixes have been squashed back down to the original commit.
I left the second commit separate for now because it's breaking. Previously, iterating over a rolling window returned only returned blocks present in the original array, and ignored the chunk of `nan`s before the start or after the end of the array. This meant that the view of the `DataArray` or `Dataset` that was returned for each iteration was potentially a different size.
Here, instead, the iterator was changed so that each returned view matches the corresponding slice of the output of the `construct()` function. To me, this seems more intuitive, and makes it easier to develop algorithms without having to call construct.
Other than the fact that it's breaking, the main drawback (and difference with `construct()`) is that the windows themselves are labeled with coordinates along the rolling axis, except for any `nan` values before the start or after the end of the actual data, which do not have labels. For comparison, in construct, the window dimension does not have any coordinates associated with it by default.
After writing this, I'm wondering if it might be useful to simply drop the coordinates along the rolling axis, so that the behavior matches the behavior of `construct()` even more closely.
I'm open to thoughts/comments/criticisms/suggestions/questions/whatever.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,944714417
https://github.com/pydata/xarray/pull/5603#issuecomment-881698914,https://api.github.com/repos/pydata/xarray/issues/5603,881698914,IC_kwDOAMm_X840jahi,223250,2021-07-16T20:25:36Z,2021-07-16T20:25:36Z,CONTRIBUTOR,"@dcherian Thanks. I thought I was done, but I'm finding things that aren't working as expected. I'm working on adding more tests for expected behavior, so marking as WIP. Will ping back here when I'm finished (maybe today, maybe early next week).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,944714417
https://github.com/pydata/xarray/pull/5603#issuecomment-880222929,https://api.github.com/repos/pydata/xarray/issues/5603,880222929,MDEyOklzc3VlQ29tbWVudDg4MDIyMjkyOQ==,223250,2021-07-14T21:29:10Z,2021-07-14T21:29:10Z,CONTRIBUTOR,"FWIW, the test failures are all the same error, which should be fixed, but should have nothing to do with this PR.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,944714417