Skip to content

Instantly share code, notes, and snippets.

@ryought
Created December 22, 2016 03:24
Show Gist options
  • Save ryought/55adb0c35da85e743623c935e3dc885c to your computer and use it in GitHub Desktop.
Save ryought/55adb0c35da85e743623c935e3dc885c to your computer and use it in GitHub Desktop.
ある関数を最小化するリストの要素を取得する
X = [(x, f(x)) for x in V]
minimizex = min(X, key=lambda x:x[1])[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment