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/issues/1533#issuecomment-538533149,https://api.github.com/repos/pydata/xarray/issues/1533,538533149,MDEyOklzc3VlQ29tbWVudDUzODUzMzE0OQ==,2448579,2019-10-04T19:35:55Z,2019-10-04T19:35:55Z,MEMBER,"Adding
``` python
if not isinstance(coords, Frozen):
coords.update(indexes)
```
before the `merge_core` call fixes this. Not sure if its right.
https://github.com/pydata/xarray/blob/283b4feba601e9838ed538106b2091d0b8264c77/xarray/core/merge.py#L455-L462","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,253395960
https://github.com/pydata/xarray/issues/1533#issuecomment-537541838,https://api.github.com/repos/pydata/xarray/issues/1533,537541838,MDEyOklzc3VlQ29tbWVudDUzNzU0MTgzOA==,2448579,2019-10-02T15:16:40Z,2019-10-02T15:16:40Z,MEMBER,Haha I thought it was already in!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,253395960
https://github.com/pydata/xarray/issues/1533#issuecomment-537527958,https://api.github.com/repos/pydata/xarray/issues/1533,537527958,MDEyOklzc3VlQ29tbWVudDUzNzUyNzk1OA==,1217238,2019-10-02T14:46:40Z,2019-10-02T14:46:40Z,MEMBER,"We should probably merge my merging refactor before doing much more on
this...
On Wed, Oct 2, 2019 at 7:28 AM Deepak Cherian
wrote:
> Nice example!
>
> I tracked this down to
>
> 1. as_variable being called when extracting the index. This seems
> sensible.
>
> https://github.com/pydata/xarray/blob/21705e61503fb49f000186c0d556e5623bd5ac82/xarray/core/merge.py#L413-L420
> 2. as_variable being called again in the expand_variable_dicts call in
> merge_core (should be avoided):
>
> https://github.com/pydata/xarray/blob/21705e61503fb49f000186c0d556e5623bd5ac82/xarray/core/merge.py#L493-L497
>
> We need to replace the appropriate objects in aligned with IndexVariables
> from indexes if indexes is not None.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> ,
> or mute the thread
>
> .
>
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,253395960
https://github.com/pydata/xarray/issues/1533#issuecomment-537518889,https://api.github.com/repos/pydata/xarray/issues/1533,537518889,MDEyOklzc3VlQ29tbWVudDUzNzUxODg4OQ==,2448579,2019-10-02T14:28:01Z,2019-10-02T14:28:01Z,MEMBER,"Nice example!
I tracked this down to
1. `as_variable` being called when extracting the index. This seems sensible.
https://github.com/pydata/xarray/blob/21705e61503fb49f000186c0d556e5623bd5ac82/xarray/core/merge.py#L413-L420
2. `as_variable` being called again in the `expand_variable_dicts` call in `merge_core` (should be avoided):
https://github.com/pydata/xarray/blob/21705e61503fb49f000186c0d556e5623bd5ac82/xarray/core/merge.py#L493-L497
We need to replace the appropriate objects in `aligned` with IndexVariables from `indexes` if `indexes is not None`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,253395960
https://github.com/pydata/xarray/issues/1533#issuecomment-537398310,https://api.github.com/repos/pydata/xarray/issues/1533,537398310,MDEyOklzc3VlQ29tbWVudDUzNzM5ODMxMA==,6213168,2019-10-02T08:46:45Z,2019-10-02T08:46:45Z,MEMBER,"Still valid in xarray 0.13
```python
import xarray
import numpy
import dask.array
def kernel():
print(""Kernel invoked!"")
return numpy.array([100, 200])
data = dask.array.Array(name='foo', dask={('foo', 0): (kernel, )}, chunks=((2,),), dtype=float)
ds = xarray.Dataset(coords={'z': ('z', data)})
```
output:
```
Kernel invoked!
Kernel invoked!
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,253395960