issue_comments: 314844258
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/issues/1475#issuecomment-314844258 | https://api.github.com/repos/pydata/xarray/issues/1475 | 314844258 | MDEyOklzc3VlQ29tbWVudDMxNDg0NDI1OA== | 1217238 | 2017-07-12T17:44:28Z | 2017-07-12T17:44:28Z | MEMBER | I don't think we need a full Probably the simplest option is to use structured dtypes, which should already work with the existing version of xarray, e.g., ``` import numpy as np import xarray interval_dtype = np.dtype([('start', float), ('stop', float)])
coords = {'x': 0.5 + np.arange(3), 'x_bounds': ('x', np.array([(0, 1), (1, 2), (2, 3)], dtype=interval_dtype))}
da = xarray.DataArray(range(3), coords=coords, dims='x')
We could probably do a few things to make these easier to use:
1. Support indexing like Conceptually, this is pretty similar to a MultiIndex (see https://github.com/pydata/xarray/pull/1426 for discussion). |
{ "total_count": 2, "+1": 2, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
242181620 |