📜  在 argmax 输出上使用 np.unravel_index - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:50.325000             🧑  作者: Mango

代码示例1
import numpy as np
a = np.arange(6).reshape(2,3) + 10
print(a)

index = np.unravel_index(np.argmax(a), a.shape)
print(index)
print(a[index])