Commit 11d9663e authored by Martin Bauer's avatar Martin Bauer
Browse files

Merge branch 'Field.hashable_contents' into 'master'

Avoid `hash()` in Field.hashable_contents

See merge request pycodegen/pystencils!91
parents 1ff1469c 7e5faa0a
......@@ -539,8 +539,13 @@ class Field(AbstractField):
return Field.Access(self, center)(*args, **kwargs)
def hashable_contents(self):
dth = hash(self._dtype)
return self._layout, self.shape, self.strides, dth, self.field_type, self._field_name, self.latex_name
return (self._layout,
self.shape,
self.strides,
self.field_type,
self._field_name,
self.latex_name,
self._dtype)
def __hash__(self):
return hash(self.hashable_contents())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment