[NumPy-Tickets] [NumPy] #1495: better error message for np.poly(np.zeros((0, 0)))

NumPy Trac numpy-tickets@scipy....
Thu May 27 21:13:03 CDT 2010


#1495: better error message for np.poly(np.zeros((0,0)))
-------------------------+--------------------------------------------------
 Reporter:  josefpktd    |       Owner:  somebody
     Type:  enhancement  |      Status:  new     
 Priority:  low          |   Milestone:  2.0.0   
Component:  Other        |     Version:          
 Keywords:               |  
-------------------------+--------------------------------------------------
 np.poly(np.zeros((0,0))) crashed with numpy 1.4.0 but has been fixed in
 trunk (2.0.0)

 the error message could be more explicit

 {{{
 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.
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1495>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list