[Numpy-discussion] question np.partition
Neal Becker
ndbecker2 at gmail.com
Thu Jan 29 20:57:28 EST 2015
It sounds like np.partition could be used to answer the question:
give me the highest K elements in a vector.
Is this a correct interpretation? Something like partial sort, but returned
elements are unsorted.
I could really make some use of this, but in my case it is a list of objects I
need to sort on a particular key. Is this algorithm available in general python
code (not specific to numpy arrays)?
--
-- Those who don't understand recursion are doomed to repeat it
More information about the NumPy-Discussion
mailing list