Skip to content

BUG: expose broadcast_shapes in the Dask namespace - #481

Open
Ra1nhy wants to merge 1 commit into
data-apis:mainfrom
Ra1nhy:codex/dask-broadcast-shapes
Open

Ra1nhy wants to merge 1 commit into
data-apis:mainfrom
Ra1nhy:codex/dask-broadcast-shapes

Conversation

@Ra1nhy

@Ra1nhy Ra1nhy commented Oct 17, 2026

Copy link
Copy Markdown

Fixes #439.

Export the existing dask.array.core.broadcast_shapes through the wrapped namespace. This adds no new broadcasting algorithm and preserves Dask's unknown-dimension handling rather than routing shapes through NumPy. The new Dask-specific regression verifies that known and unknown shapes can be combined without computing an array or changing its chunks.

Remove the name from the missing-export list and remove the five corresponding standard-test xfails after verifying them with --max-examples 200. This is only a missing metadata-function export, not a change to SciPy's broader Dask support policy or distributed execution.

Validation on macOS, CPython 3.12.14, Dask 2026.8.0, NumPy 2.5.4, based on 482d5f9:

  • Both new no-compute cases fail with AttributeError before the export and pass afterward.
  • Local project tests with the available dependencies: 272 passed, 461 skipped, compared with 270 passed, 461 skipped on untouched upstream. The same existing NumPy overflow warning occurs on both.
  • Five focused Array API tests (names, signature, compatible/incompatible shapes, no arguments): 5 failed before, 5 passed after, with the property tests configured for 200 examples. Test source: array-api-tests@6c0b59f, specification stubs: array-api@5f847a3. They ran from a fixed-source export; a test-runner namespace bootstrap loads the unchanged 2025.12 stubs without importing unexported historical stub versions. No test function or 2025.12 stub was modified.
  • Ruff 0.17.1 check passed for the three Python files.

Other array backends, other Python/Dask versions, the complete Array API suite, type checking and documentation builds were not run locally.

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.

BUG: dask.array.broadcast_shapes: missing implementation

1 participant