Skip to content

docs: clarify coarsen reduction function contract#12314

Merged
jacobtomlinson merged 1 commit intodask:mainfrom
monkeyjack123:kk/docs-coarsen-reduction-contract-9825
Mar 5, 2026
Merged

docs: clarify coarsen reduction function contract#12314
jacobtomlinson merged 1 commit intodask:mainfrom
monkeyjack123:kk/docs-coarsen-reduction-contract-9825

Conversation

@monkeyjack123
Copy link
Contributor

@monkeyjack123 monkeyjack123 commented Mar 5, 2026

Summary

Clarifies what kind of callable can be passed as the reduction argument to dask.array.coarsen.

Changes

  • Expanded the dask.array.chunk.coarsen docstring for reduction
  • Documented that reduction must accept:
    • an array-like positional input
    • axis= with a tuple of axes
    • forwarded **kwargs
  • Added note that NumPy-style / Array-API-style reductions are expected

Fixes #9825

Testing

  • Not run in this environment (missing local test dependency: cloudpickle).
  • Change is docs-only.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

     21 files  ±0       21 suites  ±0   5h 29m 48s ⏱️ - 2m 31s
 18 289 tests ±0   17 015 ✅ ±0   1 274 💤 ±0  0 ❌ ±0 
317 304 runs  ±0  273 550 ✅ +1  43 754 💤  - 1  0 ❌ ±0 

Results for commit 31c1e7b. ± Comparison against base commit 0993aa9.

@jacobtomlinson jacobtomlinson merged commit 8a9b92f into dask:main Mar 5, 2026
30 checks passed
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.

Docstring of dask.array.coarsen should provide more details on valid reduction functions

2 participants