[Scipy-tickets] [SciPy] #1509: scipy.ndimage.measurements does not return a list

SciPy Trac scipy-tickets@scipy....
Sat Sep 3 02:04:12 CDT 2011


#1509: scipy.ndimage.measurements does not return a list
-------------------------+--------------------------------------------------
 Reporter:  schwarzburg  |       Owner:  somebody   
     Type:  defect       |      Status:  new        
 Priority:  normal       |   Milestone:  Unscheduled
Component:  Other        |     Version:  0.8.0      
 Keywords:               |  
-------------------------+--------------------------------------------------
 The documentation
 http://docs.scipy.org/doc/scipy-0.8.x/reference/generated/scipy.ndimage.measurements.sum.html#scipy.ndimage.measurements.sum

 claims that sums would return a list. But it does not. Either a single
 number (completely undocumented) or an array.

 Test:
 a = np.array([[1, 0, 0],[0, 0, 1], [0, 0, 0]])
 l = np.array([[1, 0, 0],[0, 0, 2], [0, 0, 0]])
 measurements.sum(a, l)
 > 2
 measurements.sum(a, l, [1,2])
 > array([ 1.,  1.])

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1509>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list