home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1099673049

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/6449#issuecomment-1099673049 https://api.github.com/repos/pydata/xarray/issues/6449 1099673049 IC_kwDOAMm_X85Bi63Z 5635139 2022-04-14T22:16:00Z 2022-04-14T22:16:00Z MEMBER

This does look like a bug, here's another case:

```python In [78]: ...: >>> a = np.arange(0, 5, 1) ...: >>> b = np.linspace(0, 1, 5) ...: >>> ds = xr.Dataset({"a": ("x", a), "b": ("x", b)}) ...: >>> ds Out[78]: <xarray.Dataset> Dimensions: (x: 5) Dimensions without coordinates: x Data variables: a (x) int64 0 1 2 3 4 b (x) float64 0.0 0.25 0.5 0.75 1.0

In [79]: ds.query(x="a > 2") Out[79]: <xarray.Dataset> Dimensions: (x: 2) Dimensions without coordinates: x Data variables: a (x) int64 3 4 b (x) float64 0.75 1.0

In [80]: ds.set_coords('a').query(x="a > 2") Out[80]: <xarray.Dataset> Dimensions: (x: 2) Coordinates: a (x) int64 3 4 Dimensions without coordinates: x Data variables: b (x) float64 0.75 1.0

In [81]: ds.set_coords(['a','b']).query(x="a > 2")

fails

```

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