Skip to content

Commit c19ddb4

Browse files
alexfiklinducer
authored andcommitted
ensure ArrayContext is not hashable
1 parent 2f23604 commit c19ddb4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arraycontext/context.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,9 @@ def _get_fake_numpy_namespace(self) -> Any:
286286
from .fake_numpy import BaseFakeNumpyNamespace
287287
return BaseFakeNumpyNamespace(self)
288288

289+
def __hash__(self) -> int:
290+
raise TypeError(f"unhashable type: '{type(self).__name__}'")
291+
289292
@abstractmethod
290293
def empty(self,
291294
shape: Union[int, Tuple[int, ...]],

0 commit comments

Comments
 (0)