Skip to content
Snippets Groups Projects
Commit c4f00b8b authored by Alexandru Fikl's avatar Alexandru Fikl Committed by Andreas Klöckner
Browse files

mypy: fix errors from numpy 2.2

parent a5eaebe4
No related branches found
No related tags found
No related merge requests found
Pipeline #621683 failed
......@@ -309,7 +309,8 @@ def _deserialize_ndarray_container( # type: ignore[misc]
result = type(template)(template.shape, dtype=object)
for i, subary in serialized:
result[i] = subary
# FIXME: numpy annotations don't seem to handle object arrays very well
result[i] = subary # type: ignore[call-overload]
return result
......
......@@ -103,7 +103,7 @@ def _get_scalar_func_loopy_program(actx, c_name, nargs, naxes):
from arraycontext.transform_metadata import ElementwiseMapKernelTag
def sub(name: str) -> Variable | Subscript:
return Variable(name)[subscript] if subscript else Variable(name)
return Subscript(Variable(name), subscript) if subscript else Variable(name)
return make_loopy_program(
[domain_bset], [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment