home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 859736218

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/4821#issuecomment-859736218 https://api.github.com/repos/pydata/xarray/issues/4821 859736218 MDEyOklzc3VlQ29tbWVudDg1OTczNjIxOA== 37740986 2021-06-11T17:35:28Z 2021-06-11T17:35:28Z CONTRIBUTOR

I think I am quite confused by the fact that 'one' dimension can be a tuple (also I couldn't find a way to successfully create a dataset with a dim being a tuple, even by tweaking your example using list)

Was it what you imagined for the dataset construction ? (If I understand right, a virtual variable can't be a tuple) ``` def _construct_dataarray(self, name: Hashable) -> "DataArray": """Construct a DataArray by indexing this dataset""" from .dataarray import DataArray

    try:
        variable = self._variables[name]
    except KeyError:
        if isinstance(name, tuple):
            raise TypeError(f'The dimension "{name}" provided is a tuple, you may be intended to pass it as a list')
        else:
        _, name, variable = _get_virtual_variable(
            self._variables, name, self._level_coords, self.dims
        )

```

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