home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where user = 45972964 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 1

  • cmdupuis3 · 6 ✖

issue 1

  • xr.DataSet.expand_dims axis option doesn't work 6

author_association 1

  • NONE 6
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1397549856 https://github.com/pydata/xarray/issues/7456#issuecomment-1397549856 https://api.github.com/repos/pydata/xarray/issues/7456 IC_kwDOAMm_X85TTOsg cmdupuis3 45972964 2023-01-19T20:21:12Z 2023-01-19T23:54:29Z NONE

EDIT: Lots of confusion below about nothing, plz disregard

Okay, regardless of expected behavior here, my particular use-case requires that I transpose these dimensions. Can someone show me a way to do this? I tried to explain the xarray point of view to Keras, but Keras is really not interested ;)

I tried something like ds.expand_dims("sample").transpose('sample','nlat','nlon') to complete futility, probably something to do with the Frozen stuff if I had to guess.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xr.DataSet.expand_dims axis option doesn't work 1548355645
1397648400 https://github.com/pydata/xarray/issues/7456#issuecomment-1397648400 https://api.github.com/repos/pydata/xarray/issues/7456 IC_kwDOAMm_X85TTmwQ cmdupuis3 45972964 2023-01-19T21:45:24Z 2023-01-19T21:45:24Z NONE

I was thinking something like this:

da = xr.DataArray([[1,2,3],[4,5,6],[7,8,9]], coords={'a':[1,2,3], 'b':[1,2,3]}) ds = xr.Dataset({'da':da}) ds1 = ds.expand_dims('yomama', axis=0) print(ds1[0].dims) ds2 = ds.expand_dims('yomama', axis=2) print(ds2[0].dims)

...but this throws an error (like it should). I think I must be reading my code wrong lol

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xr.DataSet.expand_dims axis option doesn't work 1548355645
1397633052 https://github.com/pydata/xarray/issues/7456#issuecomment-1397633052 https://api.github.com/repos/pydata/xarray/issues/7456 IC_kwDOAMm_X85TTjAc cmdupuis3 45972964 2023-01-19T21:29:10Z 2023-01-19T21:29:10Z NONE

Okay I think I get the philosophy now. However, indexing a DataSet with an integer actually does work. If performance is the goal, shouldn't something like ds[0] throw a warning or an error?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xr.DataSet.expand_dims axis option doesn't work 1548355645
1397588476 https://github.com/pydata/xarray/issues/7456#issuecomment-1397588476 https://api.github.com/repos/pydata/xarray/issues/7456 IC_kwDOAMm_X85TTYH8 cmdupuis3 45972964 2023-01-19T20:49:52Z 2023-01-19T20:53:29Z NONE

Nvm, my use case isn't what I thought it was, but I'll push the issue a bit.

So I'm not disputing anything about what these functions actually do now, the issue I have is that the functions here treat the dimension order of a DataSet as if it's arbitrary, but calling [] on a DataSet slices it in a decidedly non-arbitrary way. It turns out that [] actually does care about which axis you select if you call expand_dims first, and you index with an integer like [0]. I think this inconsistency is what's confusing to me atm.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xr.DataSet.expand_dims axis option doesn't work 1548355645
1397408991 https://github.com/pydata/xarray/issues/7456#issuecomment-1397408991 https://api.github.com/repos/pydata/xarray/issues/7456 IC_kwDOAMm_X85TSsTf cmdupuis3 45972964 2023-01-19T18:13:16Z 2023-01-19T18:13:16Z NONE

Yeah, I could put something together. It'll probably have to wait until next week though.

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
  xr.DataSet.expand_dims axis option doesn't work 1548355645
1397292416 https://github.com/pydata/xarray/issues/7456#issuecomment-1397292416 https://api.github.com/repos/pydata/xarray/issues/7456 IC_kwDOAMm_X85TSP2A cmdupuis3 45972964 2023-01-19T16:49:58Z 2023-01-19T16:52:33Z NONE

I mean that's fine, but in that case, the documentation is very misleading

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  xr.DataSet.expand_dims axis option doesn't work 1548355645

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