Skip to content

Commit

Permalink
Rework dataclass array container arithmetic
Browse files Browse the repository at this point in the history
- Deprecate automatic broadcasting of array context arrays
- Introduce Bcast as an object to represent broadcast rules
- Warn about uses of numpy array broadcasting, deprecated earlier
- Clarify documentation, warning wording
  • Loading branch information
inducer committed Aug 5, 2024
1 parent 04142ce commit 03229d3
Show file tree
Hide file tree
Showing 4 changed files with 423 additions and 61 deletions.
17 changes: 15 additions & 2 deletions arraycontext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@
register_multivector_as_array_container,
serialize_container,
)
from .container.arithmetic import with_container_arithmetic
from .container.arithmetic import (
Bcast,
Bcast1,
Bcast2,
Bcast3,
BcastNLevels,
BcastUntilActxArray,
with_container_arithmetic,
)
from .container.dataclass import dataclass_array_container
from .container.traversal import (
flat_size_and_dtype,
Expand Down Expand Up @@ -103,6 +111,12 @@
"ArrayOrContainerOrScalarT",
"ArrayOrContainerT",
"ArrayT",
"Bcast",
"Bcast1",
"Bcast2",
"Bcast3",
"BcastNLevels",
"BcastUntilActxArray",
"CommonSubexpressionTag",
"EagerJAXArrayContext",
"ElementwiseMapKernelTag",
Expand Down Expand Up @@ -151,7 +165,6 @@
"unflatten",
"with_array_context",
"with_container_arithmetic",
"with_container_arithmetic"
)


Expand Down
Loading

0 comments on commit 03229d3

Please sign in to comment.