Skip to content

Instantly share code, notes, and snippets.

@yasufumy
Created December 17, 2016 08:29
Show Gist options
  • Save yasufumy/7b17474cf06e94710595442d0e17de59 to your computer and use it in GitHub Desktop.
Save yasufumy/7b17474cf06e94710595442d0e17de59 to your computer and use it in GitHub Desktop.
argmax function by pure python
def argmax1(array):
return array.index(max(array))
def argmax2(array):
return max(range(len(array)), key=lambda x: array[x])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment