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-345423843,https://api.github.com/repos/pydata/xarray/issues/1727,345423843,MDEyOklzc3VlQ29tbWVudDM0NTQyMzg0Mw==,6815844,2017-11-18T07:09:40Z,2017-11-18T07:09:40Z,MEMBER,"@shoyer Thanks. Confirmed. Closing.","{""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-345423545,https://api.github.com/repos/pydata/xarray/issues/1727,345423545,MDEyOklzc3VlQ29tbWVudDM0NTQyMzU0NQ==,1217238,2017-11-18T07:02:33Z,2017-11-18T07:02:33Z,MEMBER,"It looks like this may already be fixed upstream. As suggested in https://github.com/ipython/ipython/issues/10521, updating to Jedi 0.11 seems to fix the issue.","{""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-345423506,https://api.github.com/repos/pydata/xarray/issues/1727,345423506,MDEyOklzc3VlQ29tbWVudDM0NTQyMzUwNg==,6815844,2017-11-18T07:01:51Z,2017-11-18T07:01:51Z,MEMBER,"Thanks @shoyer . I think I should close the issue in 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-345423347,https://api.github.com/repos/pydata/xarray/issues/1727,345423347,MDEyOklzc3VlQ29tbWVudDM0NTQyMzM0Nw==,1217238,2017-11-18T06:57:42Z,2017-11-18T06:57:42Z,MEMBER,See here for the IPython issue: https://github.com/ipython/ipython/issues/10720,"{""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-345422593,https://api.github.com/repos/pydata/xarray/issues/1727,345422593,MDEyOklzc3VlQ29tbWVudDM0NTQyMjU5Mw==,6815844,2017-11-18T06:39:07Z,2017-11-18T06:39:07Z,MEMBER,"It seems jedi's bug. A minimal working example is 1. Save following as example.py ```python import traceback class ExampleClass(object): def __init__(self): pass @property def value(self): print('value called') print(traceback.print_exc()) ``` 2. In IPython, do ```python In [1]: import example In [2]: ex = example.ExampleClass() In [3]: ex.val -> press [Tab] value called Traceback (most recent call last): None KeyError: (('value',), frozenset()) File ""/home/keisukefujii/anaconda3/envs/tensorflow/lib/python3.5/site-packages/jedi/cache.py"", line 119, in wrapper return dct[key] File ""/home/keisukefujii/anaconda3/envs/tensorflow/lib/python3.5/site-packages/jedi/cache.py"", line 46, in wrapper return getattr(self, name) value called None AttributeError: 'CompiledName' object has no attribute '_infer' Traceback (most recent call last): ```","{""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-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-345411599,https://api.github.com/repos/pydata/xarray/issues/1727,345411599,MDEyOklzc3VlQ29tbWVudDM0NTQxMTU5OQ==,6815844,2017-11-18T02:22:35Z,2017-11-18T02:22:57Z,MEMBER,"I found this happens with IPython=6.1.0, but does not with IPython=5.1.0. Maybe it is the upstream issue. But if we can avoid this within xarray, it would be great,","{""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-345409469,https://api.github.com/repos/pydata/xarray/issues/1727,345409469,MDEyOklzc3VlQ29tbWVudDM0NTQwOTQ2OQ==,1217238,2017-11-18T01:52:52Z,2017-11-18T01:52:52Z,MEMBER,We have a unit test `test_lazy_load` in `test_dataset.py` that is probably a good place to start on the test case for this.,"{""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-345408881,https://api.github.com/repos/pydata/xarray/issues/1727,345408881,MDEyOklzc3VlQ29tbWVudDM0NTQwODg4MQ==,6815844,2017-11-18T01:45:30Z,2017-11-18T01:45:30Z,MEMBER,"Thanks. This is reproduced also in my environment. It's strange ... Tagged as a bug.","{""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 https://github.com/pydata/xarray/issues/1727#issuecomment-345406561,https://api.github.com/repos/pydata/xarray/issues/1727,345406561,MDEyOklzc3VlQ29tbWVudDM0NTQwNjU2MQ==,6815844,2017-11-18T01:17:44Z,2017-11-18T01:17:44Z,MEMBER,"Your `xr.Dataset` consists only from a single coordinate variable ```python Dimensions: (myvar: 100000000) Coordinates: * myvar (myvar) float64 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 ... Data variables: *empty* ``` (This behavior is somehow confusing...) In `xarray`, coordinate variables are always loaded into memory. The following example works well ```python In [1]: import xarray as xr ...: import numpy as np ...: ds = xr.Dataset({'myvar': (('x', 'y'), np.arange(100000000).reshape(1000 ...: , 100000))}, ...: coords={'x': np.arange(1000)}) ...: ds.to_netcdf('test.nc') ...: In [2]: ds_on_disk = xr.open_dataset('test.nc') ...: ds_on_disk['myvar'].variable._in_memory ...: Out[2]: False In [3]: ds_on_disk.my # -> [Tab] In [3]: ds_on_disk.myvar.variable._in_memory ...: Out[3]: False In [4]: ds_on_disk['x'].variable._in_memory Out[4]: True ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,275033174