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/1727#issuecomment-345411827,https://api.github.com/repos/pydata/xarray/issues/1727,345411827,MDEyOklzc3VlQ29tbWVudDM0NTQxMTgyNw==,4160723,2017-11-18T02:26:15Z,2017-11-18T02:26:15Z,MEMBER,"I've been investigating a bit, and actually in the example above the data may be loaded + duplicated!
in `Dataset._item_sources` ([this line](https://github.com/pydata/xarray/blob/6463504ae7c6fd0c2250237a2a74baf1b707723a/xarray/core/dataset.py#L807)), the item `{d: self[d] for d in self.dims}` computes the DataArray, `ds['x']`, which has the same (huge) size than `myvar`.
Still don't know exactly why the data of `myvar` is loaded (maybe something indeed related to the use in IPython 6.x of a more advanced completion system based on `jedi`).
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,275033174
https://github.com/pydata/xarray/issues/1727#issuecomment-345408160,https://api.github.com/repos/pydata/xarray/issues/1727,345408160,MDEyOklzc3VlQ29tbWVudDM0NTQwODE2MA==,4160723,2017-11-18T01:37:08Z,2017-11-18T01:37:08Z,MEMBER,"Sorry my example above was wrong. In the example below `myvar` is not a coordinate, but it still triggers data loading when pressing tab generally (not only trying to auto-complete `myvar`).
```
In [1]: import xarray as xr
In [2]: ds = xr.open_dataset('test.nc')
In [3]: ds
Out[3]:
Dimensions: (x: 1000000000)
Dimensions without coordinates: x
Data variables:
myvar (x) float64 ...
In [4]: ds['myvar']
Out[4]:
[1000000000 values with dtype=float64]
Dimensions without coordinates: x
In [5]: ds['myvar'].variable._in_memory
Out[5]: False
In [6]: ds.anything # pressed [Tab] and then [Enter]
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in ()
----> 1 ds.anything
~/GitRepos/xarray_dev/xarray/core/common.py in __getattr__(self, name)
174 return source[name]
175 raise AttributeError(""%r object has no attribute %r"" %
--> 176 (type(self).__name__, name))
177
178 def __setattr__(self, name, value):
AttributeError: 'Dataset' object has no attribute 'anything'
In [7]: ds['myvar'].variable._in_memory
Out[7]: True
```
Unless I miss something obvious (it's late), this is weird.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,275033174