issues: 566311296
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
566311296 | MDU6SXNzdWU1NjYzMTEyOTY= | 3773 | Downsampling with resample generates longer time array than expected | 9004403 | open | 0 | 0 | 2020-02-17T13:48:49Z | 2022-01-11T22:06:33Z | NONE | MCVE Code Sample```python import xarray as xr import pandas as pd from functools import reduce Create time dimension array for all climatological wintersindexes = [pd.DatetimeIndex(f'{year}-12-01', f'{year+1}-03-01', freq='12H') for year in range(1980, 2020)] index_union = reduce(pd.Index.union, indexes) Create DataArrayds = xr.Dataset({'var': ('time', np.arange(len(ix_union))), 'time': index_union}) ``` Problem DescriptionFrom here we can check
Now, if we downsample our Dataset to a one week period: ```python
Instead of getting the weeks within the months in the original Dataset, we obtain additional months with missing values in the Expected OutputWe would expect something like this: ```python
Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3773/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | issue |