issue_comments: 326750703
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/1521#issuecomment-326750703 | https://api.github.com/repos/pydata/xarray/issues/1521 | 326750703 | MDEyOklzc3VlQ29tbWVudDMyNjc1MDcwMw== | 6213168 | 2017-09-02T15:24:20Z | 2017-09-02T15:27:12Z | MEMBER | As suspected, the problem is caused specifically by non-index coords: ``` import xarray import numpy data = numpy.random.randint(1<<63, size=1000000) for r in range(50): ds = xarray.Dataset( coords={'r': [r], 'c': data, 'otherindex': data}, data_vars={'data': (('r', 'c'), data.reshape(1, data.size))}) ds.to_netcdf('fast.%02d.nc' % r) del ds['otherindex'] ds.coords['nonindex'] = ('c', data) ds.to_netcdf('slow.%02d.nc' % r) def load_coords(ds):
for coord in ds.coords.values():
coord.load()
return ds
%time xarray.open_mfdataset('fast..nc')
%time xarray.open_mfdataset('fast..nc', preprocess=load_coords)
%time xarray.open_mfdataset('slow..nc')
%time xarray.open_mfdataset('slow..nc', preprocess=load_coords)
|
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
252541496 |