We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a0c98d0 commit d2b84e2Copy full SHA for d2b84e2
1 file changed
src/array_api_extra/_delegation.py
@@ -2,7 +2,7 @@
2
3
from collections.abc import Sequence
4
from types import ModuleType
5
-from typing import Literal, cast
+from typing import Literal
6
7
from ._lib import _funcs
8
from ._lib._utils._compat import (
@@ -137,8 +137,7 @@ def broadcast_shapes(
137
or is_torch_namespace(xp)
138
)
139
):
140
- int_shapes = cast(tuple[tuple[int, ...], ...], shapes)
141
- return cast(tuple[int | None, ...], xp.broadcast_shapes(*int_shapes))
+ return xp.broadcast_shapes(*shapes)
142
143
return _funcs.broadcast_shapes(*shapes)
144
0 commit comments