home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 1020282789 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • TomNicholas 3
  • shoyer 1
  • dcherian 1
  • max-sixty 1

issue 1

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

author_association 1

  • MEMBER 6
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
950217824 https://github.com/pydata/xarray/issues/5843#issuecomment-950217824 https://api.github.com/repos/pydata/xarray/issues/5843 IC_kwDOAMm_X844oyxg max-sixty 5635139 2021-10-23T21:23:52Z 2021-10-23T21:23:52Z MEMBER

Agree! Now we just need to decide between chunksizes and chunk_sizes...

{
    "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
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
939718939 https://github.com/pydata/xarray/issues/5843#issuecomment-939718939 https://api.github.com/repos/pydata/xarray/issues/5843 IC_kwDOAMm_X844Avkb dcherian 2448579 2021-10-11T06:22:24Z 2021-10-11T06:22:24Z MEMBER

For DataArrays there is an underlying chunks property so it makes sense to forward it (like shape and dtype). Though perhaps we should only forward those properties that are common to all duck arrays.

It seems better to introduce a new property on both DataArrays and Datasets that always returns a dict (Like sizes vs shape). I came up with two names but don't like either of them: chunksizes seems too similar to chunks; dims_chunks doesn't really seem great either.

There is a similar problem for dtype as @crusaderky points out here

{
    "total_count": 1,
    "+1": 1,
    "-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
938235021 https://github.com/pydata/xarray/issues/5843#issuecomment-938235021 https://api.github.com/repos/pydata/xarray/issues/5843 IC_kwDOAMm_X8437FSN shoyer 1217238 2021-10-07T23:56:54Z 2021-10-07T23:56:54Z MEMBER

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

DataArray.chunks forwards to chunks on Dask arrays (a tuple), but that didn't make sense for Dataset.chunks due to the lack of a dimension ordering.

{
    "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 25.305ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows