home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where author_association = "MEMBER", issue = 1222609313 and user = 2448579 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • dcherian · 2 ✖

issue 1

  • netCDF + lazy backend: Error when sel is used with slice, reverse arrange · 2 ✖

author_association 1

  • MEMBER · 2 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1118690026 https://github.com/pydata/xarray/issues/6560#issuecomment-1118690026 https://api.github.com/repos/pydata/xarray/issues/6560 IC_kwDOAMm_X85Crdrq dcherian 2448579 2022-05-05T15:21:22Z 2022-05-05T15:21:40Z MEMBER

OK it has to do with the lazy backend. Calling data_example.load() fixes things. @jesieleo in the mean time, if your data is small use load_dataset or load to fix it.

Though I still can't make a minimal example. The example below works fine.

python 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') ds.isel(time=[0], isoBaricInhPa=1).z[:, ::10, :][:, ::-1, :]

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  netCDF + lazy backend: Error when sel is used with slice, reverse arrange 1222609313
1118682989 https://github.com/pydata/xarray/issues/6560#issuecomment-1118682989 https://api.github.com/repos/pydata/xarray/issues/6560 IC_kwDOAMm_X85Crb9t dcherian 2448579 2022-05-05T15:16:33Z 2022-05-05T15:16:52Z MEMBER

OK turns out my attempts at a minimal example didn't work.

There's some bug here (on xarray main) 1. the size of latitude is different in .sizes, .shape, .data.shape and 2. latitude really should be 73 elements. I don't see why a subsetting happens when slicing with ::-


@jesieleo here's how I tried to create a "minimal example"

``` python import xarray as xr import numpy as np

ds = xr.Dataset( { "z": ( ("time", "isoBaricInhPa", "latitude", "longitude"), np.ones((1, 5, 721, 1440)), # use numpy.ones to create array of same shape. ) }, coords={"latitude": np.linspace(-90, 90, 721)}, ) ds.isel(isoBaricInhPa=1).z[:, ::10, :][:, ::-1, :] ```

Though this doesn't replicate it!

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  netCDF + lazy backend: Error when sel is used with slice, reverse arrange 1222609313

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 163.104ms · About: xarray-datasette