On Thu, May 27, 2010 at 7:57 PM, Charles R Harris <[email protected] > wrote:
> > > On Thu, May 27, 2010 at 5:19 PM, <[email protected]> wrote: > >> I was tracking a test failure/crash in scipy.signal.ltisys >> >> numpy 1.4.0: >> >> >>> np.poly(np.zeros((0,0))) >> ** On entry to DGEEV parameter number 5 had an illegal value >> >> >> In current: > > In [1]: np.poly(np.zeros((0,0))) > --------------------------------------------------------------------------- > ValueError Traceback (most recent call last) > > /home/charris/<ipython console> in <module>() > > /usr/local/lib/python2.6/dist-packages/numpy/lib/polynomial.pyc in > poly(seq_of_zeros) > 126 pass > 127 else: > --> 128 raise ValueError, "input must be 1d or square 2d array." > 129 > 130 if len(seq_of_zeros) == 0: > > ValueError: input must be 1d or square 2d array. > > > Looks like it could use a better error message in this case, though. Could > you open a low priority ticket for this? > > The new Polynomial class does somewhat better: In [6]: Poly(zeros((0,0))) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) /home/charris/<ipython console> in <module>() /usr/local/lib/python2.6/dist-packages/numpy/polynomial/polynomial.pyc in __init__(self, coef, domain) /usr/local/lib/python2.6/dist-packages/numpy/polynomial/polyutils.pyc in as_series(alist, trim) 156 arrays = [np.array(a, ndmin=1, copy=0) for a in alist] 157 if min([a.size for a in arrays]) == 0 : --> 158 raise ValueError("Coefficient array is empty") 159 if any([a.ndim != 1 for a in arrays]) : 160 raise ValueError("Coefficient array is not 1-d") ValueError: Coefficient array is empty Chuck
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
