Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pymbolic/mapper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ def map_numpy_array(self,
import numpy
result = numpy.empty(expr.shape, dtype=object)
for i in numpy.ndindex(expr.shape):
result[i] = self.rec(expr[i], *args, **kwargs) # type: ignore[assignment]
result[i] = self.rec(expr[i], *args, **kwargs)

# True fact: ndarrays aren't expressions
return result # type: ignore[return-value]
Expand Down
2 changes: 1 addition & 1 deletion pymbolic/mapper/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def map_numpy_array(self, expr: np.ndarray) -> ResultT:
import numpy
result = numpy.empty(expr.shape, dtype=object)
for i in numpy.ndindex(expr.shape):
result[i] = self.rec(expr[i]) # type: ignore[call-overload]
result[i] = self.rec(expr[i])
return result # type: ignore[return-value]

def map_multivector(self, expr: MultiVector) -> ResultT:
Expand Down
4 changes: 2 additions & 2 deletions pymbolic/primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,8 @@ def __getitem__(self, subscript: _Expression | EmptyOK) -> ExpressionNode:
return Subscript(self, subscript.child)

if subscript == ():
warn("Expression.__getitem__ called with an empty tuple as an index. "
"This still returns just the aggregate (not a Subscript), "
warn(f"{type(self).__name__}.__getitem__ called with an empty tuple as "
"an index. This still returns just the aggregate (not a Subscript), "
"but this behavior will change in 2026. To avoid this warning "
"(and return a Subscript unconditionally), wrap the subscript "
"in pymbolic.primitives.EmptyOK.", DeprecationWarning, stacklevel=2)
Expand Down
Loading