Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f328498 commit b1f2d6aCopy full SHA for b1f2d6a
1 file changed
lib/matplotlib/gridspec.py
@@ -459,6 +459,12 @@ def get_topmost_subplotspec(self):
459
return self
460
461
def __eq__(self, other):
462
+ # check to make sure other has the attributes
463
+ # we need to do the comparison
464
+ if not (hasattr(other, '_gridspec') and
465
+ hasattr(other, 'num1') and
466
+ hasattr(other, 'num2')):
467
+ return False
468
return all((self._gridspec == other._gridspec,
469
self.num1 == other.num1,
470
self.num2 == other.num2))
0 commit comments