issue_comments: 527684331
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/pydata/xarray/pull/3238#issuecomment-527684331 | https://api.github.com/repos/pydata/xarray/issues/3238 | 527684331 | MDEyOklzc3VlQ29tbWVudDUyNzY4NDMzMQ== | 14808389 | 2019-09-03T23:57:11Z | 2019-09-04T15:35:58Z | MEMBER | After digging a little bit more, I think the reason why Also, it seems that because pint = pytest.importorskip("pint") ureg = pint.UnitRegistry() @pytest.mark.xfail def test_indexing_fail(): array = np.linspace(1, 2, 20) * ureg.m x = np.arange(len(array)) * ureg.s data_array = xr.DataArray(data=array, coords={"x": x}, dims=["x"]) with pytest.raises(KeyError): data_array.sel(x=np.array([13, 5, 9]) * ureg.m) @pytest.mark.filterwarnings("error:::pint[.*]") def test_indexing_pass(): array = np.linspace(1, 2, 20) * ureg.m x = np.arange(len(array)) * ureg.s data_array = xr.DataArray(data=array, coords={"x": x}, dims=["x"]) with pytest.raises(KeyError): data_array.sel(x=np.array([13, 5, 9]) * ureg.m) ``` Note: the only difference between the two is the decorator. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
484015016 |