query not possible on unnamed DataArray
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 1.4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 14
Description
What happened:
The query operation crashes if I execute it on an unamed dataarray.
What you expected to happen:
The query operation is executed sucessfully
Minimal Complete Verifiable Example:
import xarray as xr
import numpy as np
da = xr.DataArray(np.arange(0, 5, 1), dims="x")
da.query(x="x > 1")
Anything else we need to know?:
Environment:
- Python 3.8
- Xarray 0.18.2
- OS: Windows
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the Python example against the current xarray code and inspect the DataArray.query entry point. Confirm the failure for an unnamed DataArray, then verify that the same query executes successfully without a name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100