[SciPy-User] get best few of many: argsort( few= ) using std::partial_sort ?

Keith Goodman kwgoodman at gmail.com
Thu Jul 8 14:37:10 EDT 2010


On Thu, Jul 8, 2010 at 11:29 AM, Charles R Harris
<charlesr.harris at gmail.com> wrote:
>
>
> On Thu, Jul 8, 2010 at 12:19 PM, Keith Goodman <kwgoodman at gmail.com> wrote:
>>
>> On Thu, Jul 8, 2010 at 11:14 AM, Anne Archibald
>> <aarchiba at physics.mcgill.ca> wrote:
>> > Just to complicate the issue somewhat, it might be valuable to have
>> > both k-largest and k-smallest; also, one should think about what
>> > happens to NaNs and infinities. Further, it might be worth including a
>> > fast median calculation (i.e. find the median element(s) without
>> > completely sorting the array).
>>
>> I should have mentioned the name of the ticket: median in average O(n)
>> time.
>
> Yeah, I've got that. I was thinking of adding it as a generalized ufunc but
> haven't gotten around to it.

You'll be a hero when you do it. There's got to be some ticker tape
around here somewhere...



More information about the SciPy-User mailing list