summaryrefslogtreecommitdiff
path: root/numpy/lib/polynomial.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/polynomial.py')
-rw-r--r--numpy/lib/polynomial.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py
index 5bd393cd5..c0c7c2229 100644
--- a/numpy/lib/polynomial.py
+++ b/numpy/lib/polynomial.py
@@ -493,6 +493,12 @@ class poly1d(object):
other = poly1d(other)
return polydiv(other, self)
+ def __eq__(self, other):
+ return (self.coeffs == other.coeffs).all()
+
+ def __ne__(self, other):
+ return (self.coeffs != other.coeffs).any()
+
def __setattr__(self, key, val):
raise ValueError, "Attributes cannot be changed this way."