[SciPy-dev] Should ndimage.measurements.* should return lists if index is a list?

Thouis (Ray) Jones thouis@broad.mit....
Sat May 2 10:03:07 CDT 2009

On Sat, May 2, 2009 at 02:14,  <josef.pktd@gmail.com> wrote:
> One thing that neither bincount nor the current implementation allows
> but would be very useful for stats, is an axis argument for 2d arrays,
> e.g.  groupmeans(values,..., axis=0) similar to np.mean, np.var

You could get that by replacing the label_matrix with [label,
axis_position], and using the unique1d approach, then using the sparse
function to convert the result to a matrix LxN (L = labels, N = axis


More information about the Scipy-dev mailing list