Skip to content

Instantly share code, notes, and snippets.

@neuromusic
Created October 1, 2018 17:30
Show Gist options
  • Save neuromusic/a12c3de5d976f28578ce817977c5d327 to your computer and use it in GitHub Desktop.
Save neuromusic/a12c3de5d976f28578ce817977c5d327 to your computer and use it in GitHub Desktop.
pure python argmax
def argmax(vals):
return max(
range(len(vals)),
key = lambda ii: vals[ii],
)
@rafaeljcdarce
Copy link

cheers mate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment