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 = 574015429 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

  • dcherian 3

issue 1

  • expand_dims changes attrs and encoding of coordinate variable · 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
653237372 https://github.com/pydata/xarray/issues/3819#issuecomment-653237372 https://api.github.com/repos/pydata/xarray/issues/3819 MDEyOklzc3VlQ29tbWVudDY1MzIzNzM3Mg== dcherian 2448579 2020-07-02T22:00:02Z 2020-07-02T22:00:02Z MEMBER

Please reopen if you have more questions.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  expand_dims changes attrs and encoding of coordinate variable 574015429
610077592 https://github.com/pydata/xarray/issues/3819#issuecomment-610077592 https://api.github.com/repos/pydata/xarray/issues/3819 MDEyOklzc3VlQ29tbWVudDYxMDA3NzU5Mg== dcherian 2448579 2020-04-06T22:52:41Z 2020-04-06T22:52:41Z MEMBER

There is a subtle error here:

```

grid['sea_surface_temperature'].expand_dims('time', axis=0) <xarray.DataArray 'sea_surface_temperature' (time: 1, lat: 160, lon: 360)> array([[[1., 1., 1., ..., 1., 1., 1.], [1., 1., 1., ..., 1., 1., 1.], [1., 1., 1., ..., 1., 1., 1.], ..., [1., 1., 1., ..., 1., 1., 1.], [1., 1., 1., ..., 1., 1., 1.], [1., 1., 1., ..., 1., 1., 1.]]]) Coordinates: * lat (lat) int64 -80 -79 -78 -77 -76 -75 -74 ... 73 74 75 76 77 78 79 * lon (lon) int64 -180 -179 -178 -177 -176 -175 ... 175 176 177 178 179 Dimensions without coordinates: time ```

time is added as an unindexed dimension with no encoding or attrs dicts. This is because once you pull the DataArray sea_surface_temperature out of the dataset; the time variable in the dataset is not attached to that DataArray (since it doesn't have a time dimension).

When the expanded dataarray is assigned back to the dataset, we run into #2180

The only solution I could find is grid["sea_surface_temperature"] = grid.sea_surface_temperature.expand_dims("time", axis=0).assign_coords(time=grid.time)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  expand_dims changes attrs and encoding of coordinate variable 574015429
594076209 https://github.com/pydata/xarray/issues/3819#issuecomment-594076209 https://api.github.com/repos/pydata/xarray/issues/3819 MDEyOklzc3VlQ29tbWVudDU5NDA3NjIwOQ== dcherian 2448579 2020-03-03T17:40:35Z 2020-03-03T17:40:35Z MEMBER

Thanks for the clear reproducible example @jfpiolle. I am marking this as a bug.

Are you up for fixing it?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  expand_dims changes attrs and encoding of coordinate variable 574015429

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