diff options
author | cookedm <cookedm@localhost> | 2007-05-31 22:11:24 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2007-05-31 22:11:24 +0000 |
commit | 9949bc651f2213f2ac3567365a57a61f67a77772 (patch) | |
tree | e94b860c2ab676641e45e40567f4306762a30681 /numpy/lib/polynomial.py | |
parent | 94900c38a015d2464c1a3d23c19606bc953ec702 (diff) | |
download | numpy-9949bc651f2213f2ac3567365a57a61f67a77772.tar.gz |
Add __iter__ method to poly1d so that list() on a poly1d doesn't go into an infinite loop
Diffstat (limited to 'numpy/lib/polynomial.py')
-rw-r--r-- | numpy/lib/polynomial.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py index b35926900..6964277a3 100644 --- a/numpy/lib/polynomial.py +++ b/numpy/lib/polynomial.py @@ -641,6 +641,9 @@ class poly1d(object): self.__dict__['coeffs'][ind] = val return + def __iter__(self): + return iter(self.coeffs) + def integ(self, m=1, k=0): """Return the mth analytical integral of this polynomial. See the documentation for polyint. |