home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1303038334

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/6560#issuecomment-1303038334 https://api.github.com/repos/pydata/xarray/issues/6560 1303038334 IC_kwDOAMm_X85Nqsl- 90036937 2022-11-04T06:42:18Z 2022-11-04T06:43:01Z NONE

First of all, thank you for your help @dcherian @max-sixty . I finally reproduced this problem. I put the ds.isel(time=[0], isoBaricInhPa=1).z[:, ::10, :][:, ::-1, :] to ds.isel(time=[0], isoBaricInhPa=1).z[:, ::10, ::10][:, ::-1, :] can make a minimal example.

``` import numpy as np import xarray as xr ds = xr.Dataset( { "z": ( ("time", "isoBaricInhPa", "latitude", "longitude"), np.ones((1, 5, 721, 1440)), ) }, coords={"latitude": np.linspace(-90, 90, 721)}, ).to_netcdf("test.nc") ds = xr.open_dataset('test.nc') a = ds.isel(time=[0], isoBaricInhPa=1).z[:, ::10, ::10][:, ::-1, :] print(a.sizes) print(a.shape) print(a)

Frozen({'time': 1, 'latitude': 73, 'longitude': 144}) (1, 73, 144) <xarray.DataArray 'z' (time: 1, latitude: 72, longitude: 144)> array([[[1., 1., ..., 1., 1.], [1., 1., ..., 1., 1.], ..., [1., 1., ..., 1., 1.], [1., 1., ..., 1., 1.]]]) Coordinates: * latitude (latitude) float64 90.0 87.5 85.0 82.5 ... -82.5 -85.0 -87.5 -90.0 Dimensions without coordinates: time, longitude ```

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 1
}
  1222609313
Powered by Datasette · Queries took 0.874ms · About: xarray-datasette