LoginSignup
7
6

More than 5 years have passed since last update.

多次元配列の最大値(最小値)のインデックスを求める

Last updated at Posted at 2016-02-22

これでできるらしい。メモ

argmax=lambda A:np.unravel_index(np.array(A).argmax(), np.array(A).shape)
argmin=lambda A:np.unravel_index(np.array(A).argmin(), np.array(A).shape)

使い方は、argmax(リスト)で。

7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6