diff options
author | Pauli Virtanen <pav@iki.fi> | 2009-04-24 21:17:10 +0000 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2009-04-24 21:17:10 +0000 |
commit | 0d5e8c8e97e3075b1ccb2c257c998b63fad80903 (patch) | |
tree | 6e88c8b3e2436db28129bc8aa84d7920e2b3bf1d /numpy/lib/tests/test_polynomial.py | |
parent | 1a613e1c460d2e7756724b7e5c638c95519ee498 (diff) | |
download | numpy-0d5e8c8e97e3075b1ccb2c257c998b63fad80903.tar.gz |
Fix formatting of complex coefficients in poly1d
Diffstat (limited to 'numpy/lib/tests/test_polynomial.py')
-rw-r--r-- | numpy/lib/tests/test_polynomial.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_polynomial.py b/numpy/lib/tests/test_polynomial.py index 45e68d248..85fc18933 100644 --- a/numpy/lib/tests/test_polynomial.py +++ b/numpy/lib/tests/test_polynomial.py @@ -14,6 +14,15 @@ poly1d([ 3., 2., 1.]) >>> print q 2 3 x + 2 x + 1 +>>> print poly1d([1.89999+2j, -3j, -5.12345678, 2+1j]) + 3 2 +(1.9 + 2j) x - 3j x - 5.123 x + (2 + 1j) +>>> print poly1d([100e-90, 1.234567e-9j+3, -1234.999e8]) + 2 +1e-88 x + (3 + 1.235e-09j) x - 1.235e+11 +>>> print poly1d([-3, -2, -1]) + 2 +-3 x - 2 x - 1 >>> p(0) 3.0 |