Multidimensional interpolate_na not working
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 1.4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 14
Description
What is your issue?
Hi everyone,
According to xarray documentation, I try to fill NaNs by interpolation using multidimensional interpolate_n
u_interp = u.interpolate_na(dim = None, method = 'linear')
but ends up ImplementedError: dim is a required argument.
I also try
u_interp = u.interpolate_na(dim = ['level', 'lat', 'lon'], method = 'linear')
but ends up KeyError: ['level', 'lat', 'lon'].
The xarray version I have tried are: v0.19.0 (Jul 2021), v2023.6.0, v2024.5.0
Could anyone provide some thoughts on this? Thank you!
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 interpolate_na API documentation and reproduce both examples in a supported xarray environment. Compare the documented multidimensional behavior with the failures for dim=None and a list of dimensions, then review linked pull request #9402. Done should establish the intended behavior and align the implementation or documentation with it, with coverage for the reported cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100