home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where author_association = "MEMBER" and issue = 115897556 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • rabernat 2
  • shoyer 1

issue 1

  • error when using broadcast_arrays with coordinates · 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
155434562 https://github.com/pydata/xarray/issues/649#issuecomment-155434562 https://api.github.com/repos/pydata/xarray/issues/649 MDEyOklzc3VlQ29tbWVudDE1NTQzNDU2Mg== rabernat 1197350 2015-11-10T14:27:40Z 2015-11-10T14:27:40Z MEMBER

@shoyer awesome!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  error when using broadcast_arrays with coordinates 115897556
155284553 https://github.com/pydata/xarray/issues/649#issuecomment-155284553 https://api.github.com/repos/pydata/xarray/issues/649 MDEyOklzc3VlQ29tbWVudDE1NTI4NDU1Mw== shoyer 1217238 2015-11-10T04:33:14Z 2015-11-10T04:33:14Z MEMBER

This is yet another issue that magically just works after merging #648!

I'll add your example to the test suite as a regression test.

I was actually holding off on widely advertising xray.broadcast_arrays for exactly this reason -- there wasn't an easy way to fix this before, and this was a pretty obvious edge case. Now I think we can probably safely guarantee the behavior of broadcast_arrays.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  error when using broadcast_arrays with coordinates 115897556
155118253 https://github.com/pydata/xarray/issues/649#issuecomment-155118253 https://api.github.com/repos/pydata/xarray/issues/649 MDEyOklzc3VlQ29tbWVudDE1NTExODI1Mw== rabernat 1197350 2015-11-09T16:42:00Z 2015-11-09T16:42:00Z MEMBER

Most gsw functions will call np.broadcast_arrays for you internally.

I know.

So you can pass ds.a.values instead. It is ugly, I know. but consistent when using libraries that expect numpy array.

This only works if the all the arrays are appropriately shaped to begin with. It does not work in this case.

python np.broadcast_arrays(ds.x.values,ds.y.values,ds.a.values)

raises ValueError: shape mismatch: objects cannot be broadcast to a single shape. The great advantage of xray's broadcasting is that it is "aware" of the relationship between axes and coordinates, independently of the shape of the underlying numpy arrays.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  error when using broadcast_arrays with coordinates 115897556

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