summaryrefslogtreecommitdiff
path: root/numpy/lib/polynomial.py
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2010-02-08 13:13:28 +0000
committerStefan van der Walt <stefan@sun.ac.za>2010-02-08 13:13:28 +0000
commit88c05e836e527f0780a6a1430f3dc459a215badf (patch)
tree5658b3e569d7a0e2d3618e930585b01cb5773c52 /numpy/lib/polynomial.py
parent69c2a3bff7c07fd88e35b02bf1cbfa5f48abd975 (diff)
downloadnumpy-88c05e836e527f0780a6a1430f3dc459a215badf.tar.gz
BUG: Check input to poly for zero-dimensional arrays.
Diffstat (limited to 'numpy/lib/polynomial.py')
-rw-r--r--numpy/lib/polynomial.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py
index e953f71ba..002b2859a 100644
--- a/numpy/lib/polynomial.py
+++ b/numpy/lib/polynomial.py
@@ -120,9 +120,9 @@ def poly(seq_of_zeros):
"""
seq_of_zeros = atleast_1d(seq_of_zeros)
sh = seq_of_zeros.shape
- if len(sh) == 2 and sh[0] == sh[1]:
+ if len(sh) == 2 and sh[0] == sh[1] and sh[0] != 0:
seq_of_zeros = eigvals(seq_of_zeros)
- elif len(sh) ==1:
+ elif len(sh) == 1:
pass
else:
raise ValueError, "input must be 1d or square 2d array."