home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

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

  • shoyer 1
  • fmaussion 1

issue 1

  • Assign values to DataArray after interpolating Dataset produces an error · 2 ✖

author_association 1

  • MEMBER · 2 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
479561127 https://github.com/pydata/xarray/issues/2854#issuecomment-479561127 https://api.github.com/repos/pydata/xarray/issues/2854 MDEyOklzc3VlQ29tbWVudDQ3OTU2MTEyNw== shoyer 1217238 2019-04-03T16:23:31Z 2019-04-03T16:23:31Z MEMBER

It looks like this will be fixed by my latest additions to https://github.com/pydata/xarray/pull/2858.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Assign values to DataArray after interpolating Dataset produces an error 425905002
479389904 https://github.com/pydata/xarray/issues/2854#issuecomment-479389904 https://api.github.com/repos/pydata/xarray/issues/2854 MDEyOklzc3VlQ29tbWVudDQ3OTM4OTkwNA== fmaussion 10050469 2019-04-03T08:23:51Z 2019-04-03T08:23:51Z MEMBER

This is puzzling. I've edited the example a bit for clarity, but I have no clue what's going on:

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

da = xr.DataArray(np.random.random((3, 4)), dims=["assets", "year"], coords={"year": range(2010, 2018, 2)}, name='var' )

Interpolate directly the DataArray

new_da = da.interp(year=[2011, 2015])

Interpolate via dataset

new_ds = xr.Dataset({"var": da.copy()}).interp(year=[2011, 2015])['var']

Equivalent DAs

xr.testing.assert_identical(new_da, new_ds)

Indexing works

xr.testing.assert_identical(new_da.loc[{"year": 2015}], new_ds.loc[{"year": 2015}])

Assignment doesn't

new_da.loc[{"year": 2015}] = 42 new_ds.loc[{"year": 2015}] = 42 # Fails


IndexError Traceback (most recent call last) <ipython-input-35-65ad561f1692> in <module>() 21 # Assignment doesn't 22 new_da.loc[{"year": 2015}] = 42 ---> 23 new_ds.loc[{"year": 2015}] = 42 # Fails

....

~/Documents/git/xarray/xarray/core/indexing.py in getitem(self, key) 1168 def getitem(self, key): 1169 array, key = self._indexing_array_and_key(key) -> 1170 return array[key] 1171 1172 def setitem(self, key, value):

IndexError: index 2015 is out of bounds for axis 0 with size 2 ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Assign values to DataArray after interpolating Dataset produces an error 425905002

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