Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 908b31b

Browse files
committed
added __hash__ so that data model will be happy again
1 parent b1f2d6a commit 908b31b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/matplotlib/gridspec.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,3 +468,8 @@ def __eq__(self, other):
468468
return all((self._gridspec == other._gridspec,
469469
self.num1 == other.num1,
470470
self.num2 == other.num2))
471+
472+
def __hash__(self):
473+
return (hash(self._gridspec) ^
474+
hash(self.num1) ^
475+
hash(self.num2))

0 commit comments

Comments
 (0)