8000 Merge pull request #3718 from jenshnielsen/numpy_None_warnings · matplotlib/matplotlib@431edb7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 431edb7

Browse files
committed
Merge pull request #3718 from jenshnielsen/numpy_None_warnings
ENH : Use is to compare with None in backend_pdf
1 parent 6fffbf3 commit 431edb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/backends/backend_pdf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2274,7 +2274,10 @@ def delta(self, other):
22742274
ours = getattr(self, p)
22752275
theirs = getattr(other, p)
22762276
try:
2277-
different = bool(ours != theirs)
2277+
if (ours is None or theirs is None):
2278+
different = bool(not(ours is theirs))
2279+
else:
2280+
different = bool(ours != theirs)
22782281
except ValueError:
22792282
ours = np.asarray(ours)
22802283
theirs = np.asarray(theirs)

0 commit comments

Comments
 (0)
0