home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 345406561

This data as json

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-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 <xarray.Dataset> 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
Powered by Datasette · Queries took 1.283ms · About: xarray-datasette