📜  python找到两个numpy数组的相等行 - Python代码示例

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

代码示例1
import numpy as np
x = np.array([[0,1],[2,0],[3,0]])
y = np.array([2,0])
Ind = np.where((x == y).all(1))[0][0]
print("Index of y in x:", Ind)