xarray-contrib / xarray-contrib/pint-xarray
chunks returns None for quantified array
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 119
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
DataArray.chunks checks the type of the DataArray.data and sees that it's a pint Quantity rather than a dask array, so it returns None:
xr.DataArray([1,2,3], dims=['x'], attrs={'units': 'm'}).pint.quantify().pint.chunk(1).chunks
None
xarray 2026.1.0, pint-xarray 0.6.0
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 with the documented DataArray.chunks behavior and reproduce the quantified-array example using pint.quantify() and pint.chunk(1). Trace how the pint accessor wraps the underlying data and determine why chunks becomes None. Done means the example reports its dask chunking consistently, with a regression test covering quantified arrays.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100