home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 535061773

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/3315#issuecomment-535061773 https://api.github.com/repos/pydata/xarray/issues/3315 535061773 MDEyOklzc3VlQ29tbWVudDUzNTA2MTc3Mw== 35968931 2019-09-25T14:53:34Z 2019-09-25T15:00:27Z MEMBER

Really? Okay, so that means that currently we don't treat a named DataArray and a single-variable Dataset as if they are the same. For example I would have expected these two operations to give the same result: python objs = [DataArray([0], dims='x', name='a'), DataArray([0], dims='x', name='b')] concat(objs, dim='x') <xarray.DataArray 'a' (x: 2)> array([0, 0]) Dimensions without coordinates: x python objs = [Dataset({'a': ('x', [0])}), Dataset({'b': ('x', [0])})] concat(objs, dim='x') ``` self = Frozen(OrderedDict([('b', <xarray.Variable (x: 1)> array([0]))])), key = 'a'

def __getitem__(self, key: K) -> V:
  return self.mapping[key]

E KeyError: 'a'

xarray/core/utils.py:385: KeyError ```

Is this what we want to do? Surely the first one should also fail, else this is counter-intuitive. I think of a named DataArray and a single-variable Dataset as being the same thing, just a single physical variable? @shoyer am I misunderstanding xarray's data model here?

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