issues: 376154741
This data as json
| id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 376154741 | MDU6SXNzdWUzNzYxNTQ3NDE= | 2531 | DataArray.rolling() does not preserve chunksizes in some cases | 102827 | closed | 0 | 2 | 2018-10-31T20:50:33Z | 2021-03-26T19:50:49Z | 2021-03-26T19:50:49Z | CONTRIBUTOR | This issue was found and discussed in the related issue #2514 I open a separate issue for clarity. Code Sample, a copy-pastable example if possible```python import pandas as pd import numpy as np import xarray as xr t = pd.date_range(start='2018-01-01', end='2018-02-01', freq='H') bar = np.sin(np.arange(len(t))) baz = np.cos(np.arange(len(t))) da_test = xr.DataArray(data=np.stack([bar, baz]), coords={'time': t, 'sensor': ['one', 'two']}, dims=('sensor', 'time')) print(da_test.chunk({'time': 100}).rolling(time=60).mean().chunks) print(da_test.chunk({'time': 100}).rolling(time=60).count().chunks)
Problem descriptionDataArray.rolling() does not preserve the chunksizes, apparently depending on the applied method. Output of
|
{
"url": "https://api.github.com/repos/pydata/xarray/issues/2531/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |