We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd40940 commit 2e4bbb0Copy full SHA for 2e4bbb0
1 file changed
arraycontext/context.py
@@ -125,7 +125,7 @@
125
)
126
from warnings import warn
127
128
-from typing_extensions import Self, override
+from typing_extensions import Self, TypeIs, override
129
130
from pytools import memoize_method
131
@@ -483,6 +483,10 @@ def outline(self,
483
"""
484
return f
485
486
+ @classmethod
487
+ def is_array_type(cls, obj: object) -> TypeIs[Array]:
488
+ return isinstance(obj, cls.array_types)
489
+
490
# undocumented for now
491
@property
492
@abstractmethod
0 commit comments