Numpy minimum in (row, column) format

后端 未结 2 1824
独厮守ぢ
独厮守ぢ 2020-12-02 16:39

How can I know the (row, column) index of the minimum of a numpy array/matrix?

For example, if A = array([[1, 2], [3, 0]]), I want to get (1, 1)

2条回答
提交回复
热议问题