html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/pull/3818#issuecomment-637737195,https://api.github.com/repos/pydata/xarray/issues/3818,637737195,MDEyOklzc3VlQ29tbWVudDYzNzczNzE5NQ==,2443309,2020-06-02T18:44:08Z,2020-06-02T18:44:08Z,MEMBER,"Things seem to have died down here. I suggest we merge this as is. As a reminder, the `map_blocks` function is still marked as an experimental feature so I'm not too concerned about breaking things in the wild. Better to get some early feedback and iterate on the design.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,573972855 https://github.com/pydata/xarray/pull/3818#issuecomment-624768821,https://api.github.com/repos/pydata/xarray/issues/3818,624768821,MDEyOklzc3VlQ29tbWVudDYyNDc2ODgyMQ==,2443309,2020-05-06T16:59:11Z,2020-05-06T16:59:11Z,MEMBER,@dcherian - can you resolve conflicts here?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,573972855 https://github.com/pydata/xarray/pull/3818#issuecomment-602108359,https://api.github.com/repos/pydata/xarray/issues/3818,602108359,MDEyOklzc3VlQ29tbWVudDYwMjEwODM1OQ==,2443309,2020-03-21T21:39:21Z,2020-03-21T21:39:21Z,MEMBER,"I've started testing this out and have run into one problem. Here's a simple example that uses template and Dask backed DataArrays in `args` ```python ds = xr.tutorial.load_dataset('air_temperature') def func(X, y): ''' a simple reduction (assume the output can't be inferred automatically) ''' return X.sum('time') + y.min('time') ds = ds.chunk({'lat': 10, 'lon': 10}) X = ds['air'] y = ds['air'] **2 template = X.sum('time') expected = func(X, y) actual = xr.map_blocks(func, X, args=[y], template=template) xr.testing.assert_identical(actual, expected) ``` This raises: ```python-traceback --------------------------------------------------------------------------- KeyError Traceback (most recent call last) in 5 6 expected = func(X, y) ----> 7 actual = xr.map_blocks(func, X, args=[y], template=template) 8 xr.testing.assert_identical(actual, expected) /srv/conda/envs/notebook/lib/python3.7/site-packages/xarray/core/parallel.py in map_blocks(func, obj, args, kwargs, template) 424 # even if length of dimension is changed by the applied function 425 expected[""shapes""] = { --> 426 k: output_chunks[k][v] for k, v in input_chunk_index.items() 427 } 428 expected[""data_vars""] = set(template.data_vars.keys()) # type: ignore /srv/conda/envs/notebook/lib/python3.7/site-packages/xarray/core/parallel.py in (.0) 424 # even if length of dimension is changed by the applied function 425 expected[""shapes""] = { --> 426 k: output_chunks[k][v] for k, v in input_chunk_index.items() 427 } 428 expected[""data_vars""] = set(template.data_vars.keys()) # type: ignore KeyError: 'time' ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,573972855