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

David Warde-Farley dwf@cs.toronto....
Thu Jul 8 12:30:54 CDT 2010


On 2010-07-08, at 1:17 PM, denis wrote:

> argsort( bigArray )[: a few ] is not so hot.  It would be nice if
>    argsort( bigArray, few= )
> did this -- faster, save mem too. Would anyone else find this useful ?

Quite likely. I've seen these sorts of algorithms written up elsewhere and they indeed have favourable time complexity, but I've never had sufficient need to go and implement them. I don't think we'd want to introduce C++ dependencies in NumPy though, one would probably want to modify the existing sort/argsort machinery.

David


More information about the SciPy-User mailing list