Skip to content

Document how interp handles Dask chunks - #11786

Open
headtr1ck wants to merge 2 commits into
pydata:mainfrom
headtr1ck:doc-interp-dask
Open

headtr1ck wants to merge 2 commits into
pydata:mainfrom
headtr1ck:doc-interp-dask

Conversation

@headtr1ck

Copy link
Copy Markdown
Collaborator

Description

Document how interp handles chunked Dask arrays, following the discussion in #11681 (comment).

  • Chunks along the interpolated dimensions are merged into a single chunk.
  • With linear/nearest, the data is only subset to the range of the new coordinates if those are in memory. Chunked new coordinates are not computed in advance (since Rewrite interp to use apply_ufunc #9881), so all chunks are read. Loading them first can reduce the memory use considerably.
  • Adds a short "Interpolating Dask arrays" section to the user guide and a note to the interp docstrings.

Checklist

  • User visible changes (including notable bug fixes) are documented in whats-new.rst

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
      Tools: Claude Code with Opus 5.5

🤖 Generated with Claude Code

headtr1ck and others added 2 commits October 22, 2026 09:41
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
For the details of {py:meth}`~xarray.DataArray.interpolate_na`,
see {ref}`Missing values <missing_values>`.

(interp.dask)=

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the docstring is the right place for this level of detail.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sooo... You want me to just move it over or leave it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer moving it over but up to you

@headtr1ck headtr1ck added the plan to merge Final call for comments label Oct 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants