File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2323"""
2424
2525from collections .abc import Mapping
26- from typing import TYPE_CHECKING , Any
26+ from typing import TYPE_CHECKING , Any , cast
2727
2828from pytato .array import (
2929 AbstractResultWithNamedArrays ,
@@ -71,7 +71,7 @@ def map_data_wrapper(self, expr: DataWrapper) -> Array:
7171 self .bound_arguments [name ] = expr .data
7272 return make_placeholder (
7373 name = name ,
74- shape = tuple (self .rec (s ) if isinstance (s , Array ) else s
74+ shape = tuple (cast ( Array , self .rec (s ) ) if isinstance (s , Array ) else s
7575 for s in expr .shape ),
7676 dtype = expr .dtype ,
7777 axes = expr .axes ,
@@ -87,7 +87,7 @@ def map_placeholder(self, expr: Placeholder) -> Array:
8787
8888def _normalize_pt_expr (
8989 expr : DictOfNamedArrays
90- ) -> tuple [AbstractResultWithNamedArrays , Mapping [str , Any ]]:
90+ ) -> tuple [Array | AbstractResultWithNamedArrays , Mapping [str , Any ]]:
9191 """
9292 Returns ``(normalized_expr, bound_arguments)``. *normalized_expr* is a
9393 normalized form of *expr*, with all instances of
You can’t perform that action at this time.
0 commit comments