From e8542dc3417e19bea0680398732713d8dfa937ba Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Fri, 14 Oct 2022 10:04:57 +0300 Subject: [PATCH] ensure ArrayContext is not hashable --- arraycontext/context.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arraycontext/context.py b/arraycontext/context.py index e1528387..cd1830a4 100644 --- a/arraycontext/context.py +++ b/arraycontext/context.py @@ -286,6 +286,9 @@ def _get_fake_numpy_namespace(self) -> Any: from .fake_numpy import BaseFakeNumpyNamespace return BaseFakeNumpyNamespace(self) + def __hash__(self) -> int: + raise TypeError(f"unhashable type: '{type(self).__name__}'") + @abstractmethod def empty(self, shape: Union[int, Tuple[int, ...]],