home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where issue = 1192449540 and user = 22566757 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

  • DWesl · 2 ✖

issue 1

  • Unstacking the diagonals of a sequence of matrices raises ValueError: IndexVariable objects must be 1-dimensional · 2 ✖

author_association 1

  • CONTRIBUTOR 2
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1115251379 https://github.com/pydata/xarray/issues/6439#issuecomment-1115251379 https://api.github.com/repos/pydata/xarray/issues/6439 IC_kwDOAMm_X85CeWKz DWesl 22566757 2022-05-02T19:00:47Z 2022-05-02T19:05:19Z CONTRIBUTOR

Oh, right, you suggested that a bit ago.

When I checkout upstream/main in my local XArray repository root and run the example, it completes without error. When I fix the example to use the correct dimension, the implicit print on the last line shows the nearly the same as unstacked_diag from a few lines earlier.

Still not sure what fixed this, but since it's working, I don't care so much. I will wait for this to show up in a release. Thank you!

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Unstacking the diagonals of a sequence of matrices raises ValueError: IndexVariable objects must be 1-dimensional 1192449540
1115127711 https://github.com/pydata/xarray/issues/6439#issuecomment-1115127711 https://api.github.com/repos/pydata/xarray/issues/6439 IC_kwDOAMm_X85Cd3-f DWesl 22566757 2022-05-02T17:04:13Z 2022-05-02T17:45:56Z CONTRIBUTOR

Just a tip: You don't need any stacking for that. Just use an indexer with a new dim:

I am aware that I can extract the diagonal of the arrays by using the same index for each argument of isel. That is, in fact, how I extracted the diagonals in each case above (look for diag_index to find the examples).

The bit that interests me is unstacking the relevant dimension, because the data in the original case comes to me with, effectively, a stacked dimension, and I would like to turn it back into an unstacked dimension because that is what I am used to using pcolormesh to plot.

That is to say, skipping the unstacking rather defeats the purpose of what I am trying to do, unless you have suggestions for how to create a two-dimensional plot (one using something like contourf or pcolormesh) of a one-dimensional Dataset, or a series of two-dimensional plots from a two-dimensional Dataset.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Unstacking the diagonals of a sequence of matrices raises ValueError: IndexVariable objects must be 1-dimensional 1192449540

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