[SciPy-User] bottleneck group_median

Keith Goodman kwgoodman at gmail.com
Wed Jan 12 18:28:06 EST 2011


On Wed, Jan 12, 2011 at 3:19 PM, Hanno Klemm <klemm at phys.ethz.ch> wrote:
> Am 12.01.2011 um 16:26 schrieb Keith Goodman:

>> BTW, bottleneck does have a slow, brute-force, generic group function
>> that I use for unit testing. You could combine that with a fast median
>> function to get a group median:
>>
>
> Thanks for the suggstion. At the moment I am playing around with using
> the group_mapper function to get a dictionary of the values that I
> need and then shoving the subselected array to the median function.
>
> I will test which approach is faster.

I hope your approach is faster since that will be good news for
bottleneck. Subselecting with arr.take() might help speed things up.



More information about the SciPy-User mailing list