From a32b90c2293567b4b132ba0031976e583ae3d115 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 31 Oct 2009 13:52:55 -0700 Subject: [PATCH] complex number coercion fix --- Cython/Compiler/PyrexTypes.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index e7ffb1d7..4ca7f3d5 100644 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -882,6 +882,12 @@ class CComplexType(CNumericType): return self.real_type == other.real_type else: return False + + def __ne__(self, other): + if isinstance(self, CComplexType) and isinstance(other, CComplexType): + return self.real_type != other.real_type + else: + return True def __lt__(self, other): if isinstance(self, CComplexType) and isinstance(other, CComplexType): -- 2.26.2