home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 495869721

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
495869721 MDU6SXNzdWU0OTU4Njk3MjE= 3323 arithmetic resulting in inconsistent chunks 2448579 closed 0     2 2019-09-19T15:21:30Z 2019-10-10T23:44:19Z 2019-10-10T23:44:19Z MEMBER      

``` python

import xarray as xr import numpy as np

def make_da(): return xr.DataArray( np.ones((10, 20)), dims=["x", "y"], coords={"x": np.arange(10), "y": np.arange(100, 120),}, name="a", ).chunk({"x": 4, "y": 5})

map_da = make_da() map_ds = xr.Dataset() map_ds["a"] = make_da() map_ds["c"] = map_ds.x + 20 map_ds = map_ds.chunk({"x": 4, "y": 5}) ```

<xarray.Dataset> Dimensions: (x: 10, y: 20) Coordinates: * x (x) int64 0 1 2 3 4 5 6 7 8 9 * y (y) int64 100 101 102 103 104 105 106 ... 114 115 116 117 118 119 Data variables: a (x, y) float64 dask.array<chunksize=(4, 5), meta=np.ndarray> c (x) int64 dask.array<chunksize=(4,), meta=np.ndarray>

(map_ds + map_ds.y) gives y chunksize of 20 for c and 5 for a

(map_ds + map_ds.y) <xarray.Dataset> Dimensions: (x: 10, y: 20) Coordinates: * x (x) int64 0 1 2 3 4 5 6 7 8 9 * y (y) int64 100 101 102 103 104 105 106 ... 114 115 116 117 118 119 Data variables: a (x, y) float64 dask.array<chunksize=(4, 5), meta=np.ndarray> c (x, y) int64 dask.array<chunksize=(4, 20), meta=np.ndarray>

This seems reasonable except (map_ds + map_ds.y).chunks) raises an "Inconsistent chunks" error.

I ran into this writing tests for map_blocks.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3323/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

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