From ec90b28d17310f9e2af51484637ac34d83cad019 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 25 Oct 2014 20:30:40 +0100 Subject: [PATCH] Use is to compare with None in backend_pdf --- lib/matplotlib/backends/backend_pdf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/backends/backend_pdf.py b/lib/matplotlib/backends/backend_pdf.py index da970286e0cb..085c0e7ec665 100644 --- a/lib/matplotlib/backends/backend_pdf.py +++ b/lib/matplotlib/backends/backend_pdf.py @@ -2273,7 +2273,10 @@ def delta(self, other): ours = getattr(self, p) theirs = getattr(other, p) try: - different = bool(ours != theirs) + if (ours is None or theirs is None): + different = bool(not(ours is theirs)) + else: + different = bool(ours != theirs) except ValueError: ours = np.asarray(ours) theirs = np.asarray(theirs)