home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 373449569

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
373449569 MDU6SXNzdWUzNzM0NDk1Njk= 2504 isel slows down computation significantly after open_dataset 11750960 closed 0     3 2018-10-24T12:09:18Z 2018-10-25T19:12:06Z 2018-10-25T19:12:06Z CONTRIBUTOR      

isel significantly slows down a simple mean calculation:

python ds = xr.open_dataset(grid_dir_nc+'Depth.nc', chunks={'face':1}) print(ds) % time print(ds.Depth.mean().values) leads to: <xarray.Dataset> Dimensions: (face: 13, i: 4320, j: 4320) Coordinates: * i (i) int64 0 1 2 3 4 5 6 7 ... 4313 4314 4315 4316 4317 4318 4319 * j (j) int64 0 1 2 3 4 5 6 7 ... 4313 4314 4315 4316 4317 4318 4319 * face (face) int64 0 1 2 3 4 5 6 7 8 9 10 11 12 Data variables: Depth (face, j, i) float32 dask.array<shape=(13, 4320, 4320), chunksize=(1, 4320, 4320)> 1935.0237 CPU times: user 241 ms, sys: 16.9 ms, total: 258 ms Wall time: 1.05 s

ds = xr.open_dataset(grid_dir_nc+'Depth.nc', chunks={'face':1}) ds = ds.isel(i=slice(None,None,4),j=slice(None,None,4)) % time print(ds.Depth.mean().values) leads to: 1935.0199 CPU times: user 9.43 s, sys: 819 ms, total: 10.3 s Wall time: 2min 57s

Is this expected behavior?

Output of xr.show_versions()

I am using latest xarray version (pip install https://github.com/pydata/xarray/archive/master.zip)

INSTALLED VERSIONS ------------------ commit: None python: 3.6.6.final.0 python-bits: 64 OS: Linux OS-release: 3.10.0-862.2.3.el7.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 xarray: 0+unknown pandas: 0.23.4 numpy: 1.15.3 scipy: 1.1.0 netCDF4: 1.4.1 h5netcdf: None h5py: None Nio: None zarr: 2.2.0 cftime: 1.0.1 PseudonetCDF: None rasterio: None iris: None bottleneck: None cyordereddict: None dask: 0.19.2 distributed: 1.23.2 matplotlib: 2.2.2 cartopy: 0.16.0 seaborn: None setuptools: 40.2.0 pip: 10.0.1 conda: None pytest: None IPython: 6.5.0 sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2504/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 0.563ms · About: xarray-datasette