home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 1499473190 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • dcherian 2
  • dopplershift 1
  • headtr1ck 1

author_association 3

  • MEMBER 2
  • COLLABORATOR 1
  • CONTRIBUTOR 1

issue 1

  • Unexpected NaNs in broadcast · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1468814437 https://github.com/pydata/xarray/issues/7385#issuecomment-1468814437 https://api.github.com/repos/pydata/xarray/issues/7385 IC_kwDOAMm_X85XjFRl dcherian 2448579 2023-03-14T20:43:00Z 2023-03-14T20:43:00Z MEMBER

Is this behavior (filling with fill_value -> inserting Nans) because they share common dimensionality in terms of name, but have different coordinate values?

Yes broadcasting is doing alignment with outer join by default: https://github.com/pydata/xarray/issues/6304. This is conceptually pretty confusing.

I agree we should document this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Unexpected NaNs in broadcast 1499473190
1467015318 https://github.com/pydata/xarray/issues/7385#issuecomment-1467015318 https://api.github.com/repos/pydata/xarray/issues/7385 IC_kwDOAMm_X85XcOCW dopplershift 221526 2023-03-13T21:51:19Z 2023-03-13T21:51:19Z CONTRIBUTOR

@dcherian Is this behavior (filling with fill_value -> inserting Nans) because they share common dimensionality in terms of name, but have different coordinate values? My expectation was something that operated more like numpy broadcasting (repeating values, not filling with anything else).

I can understand how xarray's data model yields this behavior, but in that case it might be good to improve the docs for xarray.broadcast, because it says nothing about the behavior that (seem to me) mimics xarray.align.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Unexpected NaNs in broadcast 1499473190
1466864506 https://github.com/pydata/xarray/issues/7385#issuecomment-1466864506 https://api.github.com/repos/pydata/xarray/issues/7385 IC_kwDOAMm_X85XbpN6 headtr1ck 43316012 2023-03-13T19:53:06Z 2023-03-13T19:53:06Z COLLABORATOR

@dopplershift does this answer fix your problem?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Unexpected NaNs in broadcast 1499473190
1358892699 https://github.com/pydata/xarray/issues/7385#issuecomment-1358892699 https://api.github.com/repos/pydata/xarray/issues/7385 IC_kwDOAMm_X85Q_w6b dcherian 2448579 2022-12-20T06:21:20Z 2022-12-20T06:21:20Z MEMBER

to_array is adding a new dimension variable with values a, b respectively.

Now when you align these, NaNs are inserted. I would insert a squeeze after to_array()

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Unexpected NaNs in broadcast 1499473190

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