[SciPy-dev] Should ndimage.measurements.* should return lists if index is a list?
Thouis (Ray) Jones
Mon May 4 15:00:16 CDT 2009
On Fri, May 1, 2009 at 16:11, <firstname.lastname@example.org> wrote:
> After a recent comment by Anne, I looked at the weights option in np.bincount.
> It is as fast to calculate group/label means with np.bincount as with
> the current ndimage and it scales the same, but it works only for all
> indices and not for min, max.
> weights can be calculated for any element wise function.
> group labels can be anything that np.unique1d can handle, string
> labels take twice as long
I've attached a rewrite of mean() using this method. It's still about
5-10 times slower than the existing ndimage code. Perhaps I'm missing
some obvious optimization.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1580 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-dev/attachments/20090504/8590aae5/attachment.obj
More information about the Scipy-dev