home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "NONE" and issue = 338226520 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

  • Hoeze 4

issue 1

  • Some simple broadcast_dim method? · 4 ✖

author_association 1

  • NONE · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
405950145 https://github.com/pydata/xarray/issues/2267#issuecomment-405950145 https://api.github.com/repos/pydata/xarray/issues/2267 MDEyOklzc3VlQ29tbWVudDQwNTk1MDE0NQ== Hoeze 1200058 2018-07-18T14:26:58Z 2018-07-18T14:27:35Z NONE

Maybe related:

Consider the following example to calculate pairwise distances: x = np.array([[1,2,3,4]]) dist = x.T - x numpy automatically broadcasts the one-dimensions to get 4x4 matrices and substracts them.

As far as I can see, this example is really hard to recreate with xarray, since there is nearly no possibility to add a new dimension to x and broadcast it properly.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Some simple broadcast_dim method? 338226520
402528134 https://github.com/pydata/xarray/issues/2267#issuecomment-402528134 https://api.github.com/repos/pydata/xarray/issues/2267 MDEyOklzc3VlQ29tbWVudDQwMjUyODEzNA== Hoeze 1200058 2018-07-04T17:06:51Z 2018-07-04T17:06:51Z NONE

@shoyer so there is no direct xarray equivalent to np.broadcast_to?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Some simple broadcast_dim method? 338226520
402524911 https://github.com/pydata/xarray/issues/2267#issuecomment-402524911 https://api.github.com/repos/pydata/xarray/issues/2267 MDEyOklzc3VlQ29tbWVudDQwMjUyNDkxMQ== Hoeze 1200058 2018-07-04T16:45:39Z 2018-07-04T16:45:39Z NONE

As an explanation: I'd like to change my program to only use lazy / chunked calculations in order to save RAM.

I recognized that np.broadcast_to converts the DataArray into a numpy one. Therefore I needed some xarray way to solve this.

I tried: python DataArray.expand_dims("new_dim").isel("new_dim", np.repeat(0, target_dim_size)) but this really looks ugly and I'm not sure about the performance implications of this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Some simple broadcast_dim method? 338226520
402459865 https://github.com/pydata/xarray/issues/2267#issuecomment-402459865 https://api.github.com/repos/pydata/xarray/issues/2267 MDEyOklzc3VlQ29tbWVudDQwMjQ1OTg2NQ== Hoeze 1200058 2018-07-04T12:07:49Z 2018-07-04T12:18:54Z NONE

No, I'd need something like np.tile. expand_dims inserts only a dimension of length '1'

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Some simple broadcast_dim method? 338226520

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