[Numpy-tickets] [NumPy] #278: ValueError: trying to set with zero-sized array

NumPy numpy-tickets at scipy.net
Fri Sep 15 01:56:16 CDT 2006


#278: ValueError: trying to set with zero-sized array
-----------------------+----------------------------------------------------
 Reporter:  nils       |       Owner:  oliphant
     Type:  defect     |      Status:  new     
 Priority:  normal     |   Milestone:          
Component:  numpy.lib  |     Version:          
 Severity:  normal     |    Keywords:          
-----------------------+----------------------------------------------------
 numpy.test(1,10) results in ...
 {{{
 ======================================================================
 ERROR: check_manyways (numpy.lib.tests.test_arraysetops.test_aso)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/lib64/python2.4/site-
 packages/numpy/lib/tests/test_arraysetops.py", line 128, in check_manyways
     a = numpy.fix( nItem / 10 * numpy.random.random( nItem ) )
   File "/usr/lib64/python2.4/site-packages/numpy/lib/ufunclike.py", line
 23, in fix
     y[x<0] = y[x<0]+1
 ValueError: trying to set with zero-sized array

 ======================================================================
 ERROR: check_setmember1d (numpy.lib.tests.test_arraysetops.test_aso)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/lib64/python2.4/site-
 packages/numpy/lib/tests/test_arraysetops.py", line 80, in
 check_setmember1d
     c = setmember1d( a, b )
   File "/usr/lib64/python2.4/site-packages/numpy/lib/arraysetops.py", line
 122, in setmember1d
     perm[ii+1] = perm[ii]
 ValueError: trying to set with zero-sized array

 ======================================================================
 ERROR: check_asym (numpy.lib.tests.test_twodim_base.test_histogram2d)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/lib64/python2.4/site-
 packages/numpy/lib/tests/test_twodim_base.py", line 155, in check_asym
     H, xed, yed = histogram2d(x,y, (6, 5), range = [[0,6],[0,5]],
 normed=True)
   File "/usr/lib64/python2.4/site-packages/numpy/lib/twodim_base.py", line
 218, in histogram2d
     xbin[on_edge_x] -= 1
 ValueError: trying to set with zero-sized array

 ======================================================================
 ERROR: check_norm (numpy.lib.tests.test_twodim_base.test_histogram2d)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/lib64/python2.4/site-
 packages/numpy/lib/tests/test_twodim_base.py", line 166, in check_norm
     H, xed, yed = histogram2d(x,y,[[1,2,3,5], [1,2,3,5]], normed=True)
   File "/usr/lib64/python2.4/site-packages/numpy/lib/twodim_base.py", line
 218, in histogram2d
     xbin[on_edge_x] -= 1
 ValueError: trying to set with zero-sized array

 ======================================================================
 ERROR: check_simple (numpy.lib.tests.test_twodim_base.test_histogram2d)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/lib64/python2.4/site-
 packages/numpy/lib/tests/test_twodim_base.py", line 141, in check_simple
     H = histogram2d(x, y, (xedges, yedges))[0]
   File "/usr/lib64/python2.4/site-packages/numpy/lib/twodim_base.py", line
 218, in histogram2d
     xbin[on_edge_x] -= 1
 ValueError: trying to set with zero-sized array

 ======================================================================
 ERROR: check_simple (numpy.lib.tests.test_function_base.test_histogramnd)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/lib64/python2.4/site-
 packages/numpy/lib/tests/test_function_base.py", line 360, in check_simple
     H, edges = histogramnd(x, (2,3,3), range = [[-1,1], [0,3], [0,3]])
   File "/usr/lib64/python2.4/site-packages/numpy/lib/function_base.py",
 line 185, in histogramnd
     Ncount[i][on_edge] -= 1
 ValueError: trying to set with zero-sized array

 ----------------------------------------------------------------------
 Ran 492 tests in 0.609s

 FAILED (errors=6)
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/278>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list