home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 302695966 and user = 12229877 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

  • Zac-HD · 3 ✖

issue 1

  • Fix RGB imshow with X or Y dim of size one · 3 ✖

author_association 1

  • CONTRIBUTOR 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
371011595 https://github.com/pydata/xarray/pull/1967#issuecomment-371011595 https://api.github.com/repos/pydata/xarray/issues/1967 MDEyOklzc3VlQ29tbWVudDM3MTAxMTU5NQ== Zac-HD 12229877 2018-03-07T03:34:37Z 2018-03-07T03:34:37Z CONTRIBUTOR

Not any more :wink: - it links to the docs that "[xarray.plot.plot()] calls an xarray plotting function based on the dimensions of darray.squeeze()".

I'd actually like to keep the magic in plot() - the whole point of this is that we can do something with the data, not that we do anything in particular. For interactive use, this is valuable enough - in my view - to justify keeping an inconsistent API; particularly when there is an obvious non-magic version to use in a script. In any case, that's a topic for another pull.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix RGB imshow with X or Y dim of size one 302695966
370974503 https://github.com/pydata/xarray/pull/1967#issuecomment-370974503 https://api.github.com/repos/pydata/xarray/issues/1967 MDEyOklzc3VlQ29tbWVudDM3MDk3NDUwMw== Zac-HD 12229877 2018-03-07T00:06:15Z 2018-03-07T03:08:31Z CONTRIBUTOR

Ah, I see what you mean but don't think we need any change or additional test.

There's a catch though - xarray.plot() is special, because it (and only it) squeezes the dimensions of the array before plotting it. Therefore, the following calls all produce the same plot:

xr.DataArray(np.arange(9).reshape((3,3))).plot()
xr.DataArray(np.arange(9).reshape((1,3,3))).plot()
xr.DataArray(np.arange(9).reshape((1,1,3,1,1,1,1,3,1,1))).plot()

My view is that the test you linked to is sufficient for the test you're asking for - imshow is a special case because it can accept 3D input for RGB plots.

TLDR - working as intended IMO, it's just that nobody reads the docs. Changing the API would avoid this but at cost of convenience which is the whole point of DataArray.plot().

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix RGB imshow with X or Y dim of size one 302695966
370813600 https://github.com/pydata/xarray/pull/1967#issuecomment-370813600 https://api.github.com/repos/pydata/xarray/issues/1967 MDEyOklzc3VlQ29tbWVudDM3MDgxMzYwMA== Zac-HD 12229877 2018-03-06T15:13:43Z 2018-03-06T15:13:43Z CONTRIBUTOR

No problem - I had an hour free and no open pulls waiting on me, so the timing was good.

As a regression test it's specific to imshow, so I'm not sure what you'd want here (or whether it would work at all on the 2d mixin). More details please?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix RGB imshow with X or Y dim of size one 302695966

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