home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 911393744

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
911393744 MDU6SXNzdWU5MTEzOTM3NDQ= 5435 Broadcast does not return Datasets with unified chunks 22245117 open 0     3 2021-06-04T11:09:29Z 2021-06-16T17:41:12Z   CONTRIBUTOR      

What happened: If I broadcast a Dataset with chunked DataArrays, the resulting DataArrays are chunked differently.

What you expected to happen: If I broadcast a dataset with 2 vectors of chunk size 1, I'd expect to get 2D arrays with chunksize (1, 1), rather than (1, N) and (M, 1).

Minimal Complete Verifiable Example:

python import xarray as xr ds = xr.Dataset({i: xr.DataArray(range(i*10), dims=f"dim_{i}").chunk(1) for i in range(1, 3)}) ds.broadcast_like(ds) <xarray.Dataset> Dimensions: (dim_1: 10, dim_2: 20) Dimensions without coordinates: dim_1, dim_2 Data variables: 1 (dim_1, dim_2) int64 dask.array<chunksize=(1, 20), meta=np.ndarray> 2 (dim_1, dim_2) int64 dask.array<chunksize=(10, 1), meta=np.ndarray>

Anything else we need to know?:

Environment:

Output of <tt>xr.show_versions()</tt> INSTALLED VERSIONS ------------------ commit: None python: 3.9.5 (default, May 18 2021, 19:34:48) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 5.8.0-53-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: ('en_US', 'UTF-8') libhdf5: None libnetcdf: None xarray: 0.18.2 pandas: 1.2.4 numpy: 1.20.3 scipy: None netCDF4: None pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2021.05.1 distributed: 2021.05.1 matplotlib: None cartopy: None seaborn: None numbagg: None pint: None setuptools: 52.0.0.post20210125 pip: 21.1.2 conda: None pytest: None IPython: 7.24.1 sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5435/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 issue

Links from other tables

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