McNeel Forum
[python] index of absolute maximum value in a list
Scripting
Dancergraham
(Graham Knapp)
April 18, 2019, 1:59pm
3
Hi, try this:
max(enumerate(mylist), key = lambda x: abs(x[1]))[0]
1 Like
show post in topic
Related topics
Topic
Replies
Views
Activity
Retrieve the Indices with the Highest Number
Grasshopper
windows
,
grasshopperrhino
7
491
November 30, 2023
Python enumerate()
Scripting
python
6
7991
April 25, 2016
Python scripting help
Scripting
7
737
March 6, 2017
List values within a set min and max
Grasshopper
3
412
May 10, 2019
Python multiple items get indices
Grasshopper
9
2101
August 7, 2018