home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

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

  • mapazarr 1
  • ngreenwald 1

issue 1

  • open_dataarray(cache=False) still uses cached version of dataarray · 2 ✖

author_association 1

  • NONE · 2 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
592191561 https://github.com/pydata/xarray/issues/3785#issuecomment-592191561 https://api.github.com/repos/pydata/xarray/issues/3785 MDEyOklzc3VlQ29tbWVudDU5MjE5MTU2MQ== mapazarr 11326731 2020-02-27T21:42:54Z 2020-02-27T22:41:48Z NONE

@ngreenwald you need to update your version of xarray to 0.12.2 or greater and use the load_dataarray method instead of the open_dataarray one, in which case, the cache option is not necessary. More info here: http://xarray.pydata.org/en/stable/generated/xarray.load_dataarray.html

Here your example corrected, showing the expected output:

```python import xarray as xr import numpy as np import os

create two different xarrays with different sizes and coords

test_xr1 = xr.DataArray(np.zeros((5, 5, 3)), coords=[range(5), range(5), ["x1", "y1", "z1"]], dims=["1", "2", "3"]) test_xr2 = xr.DataArray(np.zeros((10, 2, 3)), coords=[range(10), range(2), ["x2", "y2", "z2"]], dims=["1", "2", "3"])

display(test_xr1.coords) display(test_xr2.coords) Out: Coordinates: * 1 (1) int64 0 1 2 3 4 * 2 (2) int64 0 1 2 3 4 * 3 (3) <U2 'x1' 'y1' 'z1'

Coordinates: * 1 (1) int64 0 1 2 3 4 5 6 7 8 9 * 2 (2) int64 0 1 * 3 (3) <U2 'x2' 'y2' 'z2' python

save first xarray, reload it, and inspect coords

test_xr1.to_netcdf("test_xr.xr") loaded_xr = xr.load_dataarray("test_xr.xr") loaded_xr.coords Out: Coordinates: * 1 (1) int64 0 1 2 3 4 * 2 (2) int64 0 1 2 3 4 * 3 (3) object 'x1' 'y1' 'z1' python

remove first xarray, save second with the same name, and load it

os.remove("test_xr.xr") test_xr2.to_netcdf("test_xr.xr") loaded_xr = xr.load_dataarray("test_xr.xr") loaded_xr.coords Out: Coordinates: * 1 (1) int64 0 1 2 3 4 5 6 7 8 9 * 2 (2) int64 0 1 * 3 (3) object 'x2' 'y2' 'z2' ```

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  open_dataarray(cache=False) still uses cached version of dataarray 568705055
592051771 https://github.com/pydata/xarray/issues/3785#issuecomment-592051771 https://api.github.com/repos/pydata/xarray/issues/3785 MDEyOklzc3VlQ29tbWVudDU5MjA1MTc3MQ== ngreenwald 13770365 2020-02-27T16:30:36Z 2020-02-27T16:30:36Z NONE

Hey all, just wanted to follow up to see if anyone had suggestions for how to approach this.

We're running into this issue when we load an xarray, make some changes to it, and then save the modified version. Especially for interactive sessions, this produces bugs that are challenging to track down, as it appears that the previous step has failed, not that the actual loading is the problem.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  open_dataarray(cache=False) still uses cached version of dataarray 568705055

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