home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 136588625

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/551#issuecomment-136588625 https://api.github.com/repos/pydata/xarray/issues/551 136588625 MDEyOklzc3VlQ29tbWVudDEzNjU4ODYyNQ== 2443309 2015-09-01T05:13:34Z 2015-09-01T05:13:34Z MEMBER

I started working on a second PR for this issue and ran across this issue:

``` Python In [1]: import numpy as np In [2]: import xray In [3]: data = np.random.random((2, 2)) In [4]: da = xray.DataArray(data) In [5]: ds = xray.Dataset() In [6]: ds[(4, 5)] = da In [7]: print(ds)

traceback shortened


KeyError Traceback (most recent call last) /Users/jhamman/Dropbox/src/xray/xray/core/dataset.py in _get_virtual_variable(variables, key) 37 """ 38 if not isinstance(key, basestring): ---> 39 raise KeyError(key) 40 41 split_key = key.split('.', 1)

KeyError: 4 ```

It looks like we have something else to fix because it is possible to create a dataset that behaves like a dictionary but cant be written to disk or printed.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  103055174
Powered by Datasette · Queries took 0.682ms · About: xarray-datasette