[SciPy-dev] Should ndimage.measurements.* should return lists if index is a list?
Thouis (Ray) Jones
thouis at broad.mit.edu
Sat May 2 11:03:07 EDT 2009
On Sat, May 2, 2009 at 02:14, <josef.pktd at 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
size).
Ray
More information about the SciPy-Dev
mailing list