Skip to content

Commit

Permalink
ensure ArrayContext is not hashable
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Oct 14, 2022
1 parent 2f23604 commit c19ddb4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arraycontext/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, ...]],
Expand Down

0 comments on commit c19ddb4

Please sign in to comment.