Skip to content

Commit bd70008

Browse files
committed
Merge pull request matplotlib#2581 from leejjoon/affine_base_eq
AffineBase.__eq__ should not raise an exception when the other does not ...
2 parents 3ccb41c + 152f5a8 commit bd70008

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/transforms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,7 @@ def _concat(a, b):
15591559
return np.dot(b, a)
15601560

15611561
def __eq__(self, other):
1562-
if other.is_affine:
1562+
if getattr(other, "is_affine", False):
15631563
return np.all(self.get_matrix() == other.get_matrix())
15641564
return NotImplemented
15651565

0 commit comments

Comments
 (0)