diff options
author | cookedm <cookedm@localhost> | 2005-10-29 21:56:26 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2005-10-29 21:56:26 +0000 |
commit | 19ec5dad84e1b864c7748f17110cce633c56bd98 (patch) | |
tree | bbe50e0b646f17ce75486f3b023ce5cd23ea9077 /scipy/base/polynomial.py | |
parent | fb209515eba92549f7806ac6127c9eb5710bdd63 (diff) | |
download | numpy-19ec5dad84e1b864c7748f17110cce633c56bd98.tar.gz |
TLC for polynomial.py: cleanup, poly1d class is now new-type, and unittests
The unit tests are doctests.
Diffstat (limited to 'scipy/base/polynomial.py')
-rw-r--r-- | scipy/base/polynomial.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scipy/base/polynomial.py b/scipy/base/polynomial.py index 0160626d4..6812d8ca0 100644 --- a/scipy/base/polynomial.py +++ b/scipy/base/polynomial.py @@ -227,8 +227,8 @@ def polyval(p, x): or x can be another polynomial and the composite polynomial p(x) will be returned. - Notice: This can produce inaccurate results for polynomials with significant - variability. Use carefully. + Notice: This can produce inaccurate results for polynomials with + significant variability. Use carefully. """ p = NX.asarray(p) if isinstance(x, poly1d): @@ -377,7 +377,7 @@ class poly1d(object): raise ValueError, "Polynomial must be 1d only." c_or_r = trim_zeros(c_or_r, trim='f') if len(c_or_r) == 0: - c_or_r = NX.array([0]) + c_or_r = NX.array([0.]) self.__dict__['coeffs'] = c_or_r self.__dict__['order'] = len(c_or_r) - 1 |