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
Josef
On Thu, May 27, 2010 at 5:19 PM, <josef.pktd@gmail.com> 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? Chuck
On Thu, May 27, 2010 at 7:57 PM, Charles R Harris <charlesr.harris@gmail.com
wrote:
On Thu, May 27, 2010 at 5:19 PM, <josef.pktd@gmail.com> 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
On Thu, May 27, 2010 at 10:00 PM, Charles R Harris <charlesr.harris@gmail.com> wrote:
On Thu, May 27, 2010 at 7:57 PM, Charles R Harris <charlesr.harris@gmail.com> wrote:
On Thu, May 27, 2010 at 5:19 PM, <josef.pktd@gmail.com> 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
http://projects.scipy.org/numpy/ticket/1495 Thanks, Josef
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
participants (2)
-
Charles R Harris
-
josef.pktd@gmail.com