[Scipy-tickets] [SciPy] #501: ndimage.maximum returns wrong result

SciPy scipy-tickets@scipy....
Sat Sep 15 10:48:28 CDT 2007


#501: ndimage.maximum returns wrong result
---------------------------+------------------------------------------------
 Reporter:  vladan         |       Owner:  somebody
     Type:  defect         |      Status:  new     
 Priority:  high           |   Milestone:          
Component:  scipy.ndimage  |     Version:  0.5.2   
 Severity:  critical       |    Keywords:          
---------------------------+------------------------------------------------
 ndimage.maximum returns wrong result (0.0) when all elements of input
 (corresponding to the given labels and index) are negative. and
 ndimage.maximumPosition.

 For example:

 >>> ndimage.maximum(input=numpy.array([-2,-3,-1]))
 0.0

 or:

 >>> ndimage.maximum(input=numpy.array([2,-3,-1]), labels=[2,1,1],
 index=[1])
 0.0

 The same is true for ndimage.maximumPosition.

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


More information about the Scipy-tickets mailing list