[SciPy-user] Array selection help

Stéfan van der Walt stefan@sun.ac...
Wed Feb 11 08:22:05 CST 2009


2009/2/11 Jose Luis Gomez Dans <josegomez@gmx.net>:
> On Wednesday 11 February 2009 07:39:21 Stéfan van der Walt wrote:
>> scipy.ndimage.mean(arr2, labels=arr1, index=np.unique(arr1))
>
> True. The question is, how do I get the output of your code back into my
> original array? Presumably, there's another function that does that quickly?

It is already in an array, so I'm not sure I understand.  Maybe you mean

out[:] = scipy.ndimage.mean(...) ?

Stéfan


More information about the SciPy-user mailing list