Skip to content

apply_ufunc: only loop over some dimensions with vectorize=[dims] - #379

Draft
headtr1ck wants to merge 5 commits into
xarray-contrib:mainfrom
headtr1ck:apply-ufunc-vectorize-dims
Draft

headtr1ck wants to merge 5 commits into
xarray-contrib:mainfrom
headtr1ck:apply-ufunc-vectorize-dims

Conversation

@headtr1ck

Copy link
Copy Markdown

Documents the new apply_ufunc(..., vectorize=["time"]) option from pydata/xarray#11681, which only loops over the given dimensions and passes all other loop dimensions to the function in bulk.

  • Automatic vectorization page: reuse the vectorize=True example with new latitudes that vary along time, then only loop over time (12 → 4 calls), plus a short performance comparison on the full dataset (~3x faster).
  • example-interp: section on looping over some dimensions only, replacing the apply_ufunc_vectorize_1d notebook that is removed from the xarray docs in Fix interp performance regression for vectorized interpolation pydata/xarray#11681.

This needs an xarray release that includes pydata/xarray#11681, so it stays a draft until then.

AI disclosure: the notebook changes were written with Claude Code (Opus 5.5) and executed against the xarray PR branch.

🤖 Generated with Claude Code

headtr1ck and others added 5 commits October 20, 2026 23:13
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant