DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
numpy get index of n largest values
numbers = np.array([1, 3, 2, 4]) n = 2 indices = (-numbers).argsort()[:n]
Source by www.kite.com #
PREVIOUS
NEXT
Tagged:
#numpy
#index
#largest
#values
ADD COMMENT
Topic
COMMENT
Name
4+5 =
Submit