Skip to content

Commit e0e7889

Browse files
committed
Type-ignore ndarray assignments for numpy 2.2
1 parent 3df204b commit e0e7889

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pymbolic/mapper/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ def map_numpy_array(self,
963963
import numpy
964964
result = numpy.empty(expr.shape, dtype=object)
965965
for i in numpy.ndindex(expr.shape):
966-
result[i] = self.rec(expr[i], *args, **kwargs)
966+
result[i] = self.rec(expr[i], *args, **kwargs) # type: ignore[assignment]
967967

968968
# True fact: ndarrays aren't expressions
969969
return result # type: ignore[return-value]

pymbolic/mapper/evaluator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def map_numpy_array(self, expr: np.ndarray) -> ResultT:
163163
import numpy
164164
result = numpy.empty(expr.shape, dtype=object)
165165
for i in numpy.ndindex(expr.shape):
166-
result[i] = self.rec(expr[i])
166+
result[i] = self.rec(expr[i]) # type: ignore[call-overload]
167167
return result # type: ignore[return-value]
168168

169169
def map_multivector(self, expr: MultiVector) -> ResultT:

0 commit comments

Comments
 (0)