home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 1020282789 and user = 35968931 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

  • TomNicholas · 3 ✖

issue 1

  • Why are `da.chunks` and `ds.chunks` properties inconsistent? · 3 ✖

author_association 1

  • MEMBER 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
942459595 https://github.com/pydata/xarray/issues/5843#issuecomment-942459595 https://api.github.com/repos/pydata/xarray/issues/5843 IC_kwDOAMm_X844LMrL TomNicholas 35968931 2021-10-13T16:09:15Z 2021-10-13T16:09:15Z MEMBER

It seems better to introduce a new property on both DataArrays and Datasets that always returns a dict

That's a good suggestion - then we can have backwards compatibility whilst also allowing intuitive code that treats dataarrays and datasets similarly, e.g:

python def is_core_dim_chunked(obj, core_dim): return len(obj.chunksizes[core_dim]) > 1

chunksizes seems too similar to chunks

I think chunksizes is quite good: it is in keeping with sizes, and auto-complete would also show both chunks and chunksizes when a user types .ch[tab] which I think is helpful.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Why are `da.chunks` and `ds.chunks` properties inconsistent? 1020282789
938237555 https://github.com/pydata/xarray/issues/5843#issuecomment-938237555 https://api.github.com/repos/pydata/xarray/issues/5843 IC_kwDOAMm_X8437F5z TomNicholas 35968931 2021-10-08T00:03:36Z 2021-10-08T00:03:36Z MEMBER

The honest answer is that I didn't think too carefully about this when originally implementing Xarray's Dask wrapper back in 2015.

I guessed that might be the case!

I'm not sure whether making this consistent is worth the effort of a significant breaking change though

Still leaves this question though ^ . I made a draft PR in https://github.com/pydata/xarray/pull/5846.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Why are `da.chunks` and `ds.chunks` properties inconsistent? 1020282789
938186104 https://github.com/pydata/xarray/issues/5843#issuecomment-938186104 https://api.github.com/repos/pydata/xarray/issues/5843 IC_kwDOAMm_X84365V4 TomNicholas 35968931 2021-10-07T22:00:55Z 2021-10-07T22:00:55Z MEMBER

Variable.chunks also returns a tuple, which again I feel is weird given that variables have named dimensions.

There is another difference between ds.chunks and da.chunks - the former checks for inconsistent chunking between different variables when called (and will raise ValueError Object has inconsistent chunks along dimension {dim}. This can be fixed by calling unify_chunks()."). In contrast da.chunks doesn't check, and so it's possible to have a DataArray whose data variable is chunked inconsistently with its coordinate variables and not be warned about it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Why are `da.chunks` and `ds.chunks` properties inconsistent? 1020282789

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 81.409ms · About: xarray-datasette