home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 1370063272

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
1370063272 I_kwDOAMm_X85RqYGo 7021 Inconsistent behavior between `DatasetRolling.construct` and `DataArrayRolling.construct` with stride > 1. 39671216 closed 0     3 2022-09-12T15:04:08Z 2023-09-20T19:31:50Z 2023-09-20T19:31:50Z CONTRIBUTOR      

What is your issue?

INSTALLED VERSIONS

commit: None python: 3.8.10 | packaged by conda-forge | (default, May 11 2021, 07:01:05) [GCC 9.3.0] python-bits: 64 OS: Linux OS-release: 5.4.0-73-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LOCALE: ('en_US', 'UTF-8') libhdf5: 1.12.2 libnetcdf: 4.9.0

xarray: 2022.6.0 pandas: 1.4.2 numpy: 1.19.5 scipy: 1.7.0 netCDF4: 1.6.0 pydap: None h5netcdf: 1.0.2 h5py: 3.1.0 Nio: None zarr: 2.12.0 cftime: 1.6.1 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: 1.3.4 dask: 2021.06.2 distributed: 2021.06.2 matplotlib: 3.5.3 cartopy: None seaborn: 0.12.0 numbagg: None fsspec: 2021.07.0 cupy: 9.2.0 pint: None sparse: 0.13.0 flox: None numpy_groupies: None setuptools: 49.6.0.post20210108 pip: 21.1.3 conda: 4.10.3 pytest: 6.2.4 IPython: 7.24.1 sphinx: None

Reproducing the problem

I have an xarray Dataset with a single dimension as specified. (Or any arbitrary Xarray's Dataset ```

Dimensions: time: 11058688 When applied rolling operation on `DataArray` with no overlapping window, it is working as one would normally expected.python dataset.var_a.rolling(k=256).construct('w', stride=256) `11058688 / 256 = 43198` Dimensions: time: 43198, k: 256 # 43198 windows ```

However when applying the same operation to the Dataset:

python dataset.rolling(k=256).construct('w', stride=256) ```

Dimensions: time: 169, k: 256 # How can we even arrived at 169 windows? ```

I don't see any reasons why should rolling on Dataset and DataArray should behave differently. Shouldn't rolling on dataset is just repeating DataArray rolling on every data variable? This differing behavior is not mentioned on the documentation either.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7021/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 156.939ms · About: xarray-datasette