[SciPy-dev] Should ndimage.measurements.* should return lists if index is a list?
Fri Apr 17 21:06:57 CDT 2009
> Current behavior:
>>>> from scipy import ndimage
>>>> ndimage.maximum([[1,2], [3,4]], [[1,0],[0,2]], index=[1,2])
> [1.0, 4.0]
>>>> ndimage.maximum([[1,2], [3,4]], [[1,0],[0,2]], index=)
>>>> ndimage.maximum([[1,2], [3,4]], [[1,0],[0,2]], index=1)
> I think the second result should be [1.0]. We're using the ndimage
> code for image processing, and have to wrap the measurement functions
> to make the code general for the case where there is only one object
> in the image.
I've run into this too, and had the same thought. It's such a corner-
case that it doesn't seem like gratuitous API-breakage to make this
More information about the Scipy-dev