[SciPy-User] get best few of many: argsort( few= ) using std::partial_sort ?
David Warde-Farley
dwf at cs.toronto.edu
Thu Jul 8 13:30:54 EDT 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