issue_comments
1 row where issue = 425905002 and user = 10050469 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- Assign values to DataArray after interpolating Dataset produces an error · 1 ✖
| id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 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 DataArraynew_da = da.interp(year=[2011, 2015]) Interpolate via datasetnew_ds = xr.Dataset({"var": da.copy()}).interp(year=[2011, 2015])['var'] Equivalent DAsxr.testing.assert_identical(new_da, new_ds) Indexing worksxr.testing.assert_identical(new_da.loc[{"year": 2015}], new_ds.loc[{"year": 2015}]) Assignment doesn'tnew_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
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]);
user 1