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/issues/3608#issuecomment-884377683,https://api.github.com/repos/pydata/xarray/issues/3608,884377683,IC_kwDOAMm_X840tohT,223250,2021-07-21T17:53:59Z,2021-07-21T17:53:59Z,CONTRIBUTOR,"Question: instead of adding `stride` to `reduce` and `_reduce_method`, why not add it as a member of `DataArrayRolling` directly? This would allow, e.g., `__iter__` to use it as well, and seems like a cleaner interface.
I've been confused why some parameters are available only in `construct` (`stride`, `fill_value`), some are available both in `construct` and in the `DataArrayRolling` constructor (`keep_attrs`), and some are only available in the constructor (`min_periods`, `center`, and soon `pad`).
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,535703663
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
https://github.com/pydata/xarray/issues/2007#issuecomment-880141480,https://api.github.com/repos/pydata/xarray/issues/2007,880141480,MDEyOklzc3VlQ29tbWVudDg4MDE0MTQ4MA==,223250,2021-07-14T19:10:46Z,2021-07-14T19:10:46Z,CONTRIBUTOR,"I added support for `.rolling(..., pad=False)` in #5603. The basic implementation was simple, but getting it working for bottleneck/dask took a little more work.
That fixes, e.g., #4743, but I don't think it's a complete fix for this issue.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,307783090
https://github.com/pydata/xarray/issues/2007#issuecomment-876103462,https://api.github.com/repos/pydata/xarray/issues/2007,876103462,MDEyOklzc3VlQ29tbWVudDg3NjEwMzQ2Mg==,223250,2021-07-08T03:55:33Z,2021-07-08T03:55:33Z,CONTRIBUTOR,"> `.pad(...).rolling(..., pad=False)`
For this API, it seems that the only thing that would need to be implemented would be adding a `pad` keyword argument to rolling, defaulting to `True`. Is that correct?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,307783090
https://github.com/pydata/xarray/pull/2968#issuecomment-493632403,https://api.github.com/repos/pydata/xarray/issues/2968,493632403,MDEyOklzc3VlQ29tbWVudDQ5MzYzMjQwMw==,223250,2019-05-18T00:18:37Z,2019-05-18T00:18:37Z,CONTRIBUTOR,@dcherian added. Let me know if you want any changes.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,445045305
https://github.com/pydata/xarray/pull/2968#issuecomment-493497801,https://api.github.com/repos/pydata/xarray/issues/2968,493497801,MDEyOklzc3VlQ29tbWVudDQ5MzQ5NzgwMQ==,223250,2019-05-17T15:34:23Z,2019-05-17T15:34:23Z,CONTRIBUTOR,Changed to simply add examples to `DataArrayRolling.reduce()`. I changed the original description accordingly.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,445045305
https://github.com/pydata/xarray/pull/2968#issuecomment-493494703,https://api.github.com/repos/pydata/xarray/issues/2968,493494703,MDEyOklzc3VlQ29tbWVudDQ5MzQ5NDcwMw==,223250,2019-05-17T15:25:45Z,2019-05-17T15:26:03Z,CONTRIBUTOR,"Actually, every window has at least 1 valid value, so this change isn't really needed at all.
I'll remove the code changes, and change the added example to show a working example of what I wanted.
I will say that `min_periods` isn't the most obvious name for this parameter--I'm struggling to figure out how the number of valid observations in a window is related to periods or periodicity.
Would it be reasonable to deprecate `min_periods` and change it to something like `min_observations`?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,445045305
https://github.com/pydata/xarray/pull/2968#issuecomment-493489589,https://api.github.com/repos/pydata/xarray/issues/2968,493489589,MDEyOklzc3VlQ29tbWVudDQ5MzQ4OTU4OQ==,223250,2019-05-17T15:10:49Z,2019-05-17T15:10:49Z,CONTRIBUTOR,"@mathause, thank you, I didn't realize that. I'll make those changes.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,445045305
https://github.com/pydata/xarray/pull/2767#issuecomment-469088112,https://api.github.com/repos/pydata/xarray/issues/2767,469088112,MDEyOklzc3VlQ29tbWVudDQ2OTA4ODExMg==,223250,2019-03-04T01:22:04Z,2019-03-04T01:22:04Z,CONTRIBUTOR,No worries--thanks for merging!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,409618228
https://github.com/pydata/xarray/pull/2767#issuecomment-468980810,https://api.github.com/repos/pydata/xarray/issues/2767,468980810,MDEyOklzc3VlQ29tbWVudDQ2ODk4MDgxMA==,223250,2019-03-03T02:28:02Z,2019-03-03T02:28:02Z,CONTRIBUTOR,Rebased to fix the NEWS conflict.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,409618228
https://github.com/pydata/xarray/pull/2767#issuecomment-467568430,https://api.github.com/repos/pydata/xarray/issues/2767,467568430,MDEyOklzc3VlQ29tbWVudDQ2NzU2ODQzMA==,223250,2019-02-26T19:02:23Z,2019-02-26T19:02:23Z,CONTRIBUTOR,@shoyer I force pushed the requested changes. Please let me know if there is anything else. Thanks!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,409618228
https://github.com/pydata/xarray/pull/2767#issuecomment-466463669,https://api.github.com/repos/pydata/xarray/issues/2767,466463669,MDEyOklzc3VlQ29tbWVudDQ2NjQ2MzY2OQ==,223250,2019-02-22T16:47:11Z,2019-02-22T16:47:11Z,CONTRIBUTOR,"> I agree that it makes sense to recompute dimensions from variables.
Okay, that's what this PR already did (via the call to `_replace_with_new_dims`).
Rebased on master. From my perspective, this should be good to go.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,409618228
https://github.com/pydata/xarray/pull/2767#issuecomment-466083575,https://api.github.com/repos/pydata/xarray/issues/2767,466083575,MDEyOklzc3VlQ29tbWVudDQ2NjA4MzU3NQ==,223250,2019-02-21T17:11:05Z,2019-02-21T17:11:05Z,CONTRIBUTOR,"@shoyer I'm sure you're busy... wondering if you might have time to review this (or direct it to someone else to review)?
Other than my question above, it should be pretty straightforward.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,409618228
https://github.com/pydata/xarray/issues/1949#issuecomment-463309270,https://api.github.com/repos/pydata/xarray/issues/1949,463309270,MDEyOklzc3VlQ29tbWVudDQ2MzMwOTI3MA==,223250,2019-02-13T18:20:28Z,2019-02-13T18:20:28Z,CONTRIBUTOR,"I was looking for a way to drop dimensions, similar to the OP, and found this issue. I created an implementation of `Dataset.drop_dims` in #2767 which should work.","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 1, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,301031693
https://github.com/pydata/xarray/pull/2767#issuecomment-463078403,https://api.github.com/repos/pydata/xarray/issues/2767,463078403,MDEyOklzc3VlQ29tbWVudDQ2MzA3ODQwMw==,223250,2019-02-13T06:38:43Z,2019-02-13T06:38:43Z,CONTRIBUTOR,"I was looking for this functionality and ran across #1949.
There was one bit of behavior that was unclear to me. Say I have
```python
In [6]: data = xr.Dataset({'A': (['x', 'y'], np.random.randn(2, 3)),
...: 'B': ('x', np.random.randn(2)),
...: 'x': ['a', 'b'], 'z': np.pi})
In [7]: data
Out[7]:
Dimensions: (x: 2, y: 3)
Coordinates:
* x (x)
Dimensions: ()
Data variables:
z float64 3.142
```
In this case, I dropped `x`, but because that eliminated variable `A`, I also dropped my `y` dimension, since `A` was the only variable using `y`.
At one point, I implemented this slightly differently, which instead gave
```python
In [8]: data.drop_dims('x')
Out[8]:
Dimensions: (y: 3)
Dimensions without coordinates: y
Data variables:
z float64 3.142
```
In some ways, this seems preferable, especially if `y` has coordinates. The only downside I can see is that this version called `Dataset._replace_vars_and_dims()`, the docstring for which says it's deprecated (although it's still widely used).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,409618228