[Scipy-tickets] [SciPy] #1491: ndimage.label ignores output keyword

SciPy Trac scipy-tickets@scipy....
Thu Aug 4 10:37:35 CDT 2011

#1491: ndimage.label ignores output keyword
 Reporter:  jjhelmus       |       Owner:  somebody   
     Type:  defect         |      Status:  new        
 Priority:  normal         |   Milestone:  Unscheduled
Component:  scipy.ndimage  |     Version:  0.9.0      
 Keywords:                 |  
 ndimage.label does not interpret the output keyword as described in the
 documentation.  Passing a data type does not result in the labeled_array
 being of that dtype but rather numpy.int32.  Passing an array results in a
 RuntimeError unless array is of type int32.

 The offending lines are lines 153-157 in measurements.py:

 if isinstance(output, numpy.ndarray):
         if output.dtype.type != numpy.int32:
             raise RuntimeError('output type must be int32')
         output = numpy.int32

 This is because the output array is interpreted as an Int32 array in

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

More information about the Scipy-tickets mailing list