From 393473fbace1bb64ef73ab3ebd11a78db832dca1 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Tue, 24 Jul 2007 07:33:28 +0000 Subject: Fix polynomial comparison. Closes ticket #554. --- numpy/lib/polynomial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/lib/polynomial.py') diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py index edaa319cd..8231cbd87 100644 --- a/numpy/lib/polynomial.py +++ b/numpy/lib/polynomial.py @@ -606,10 +606,10 @@ class poly1d(object): return polydiv(other, self) def __eq__(self, other): - return (self.coeffs == other.coeffs).all() + return NX.alltrue(self.coeffs == other.coeffs) def __ne__(self, other): - return (self.coeffs != other.coeffs).any() + return NX.any(self.coeffs != other.coeffs) def __setattr__(self, key, val): raise ValueError, "Attributes cannot be changed this way." -- cgit v1.2.1