I want to find indexes of array like x = np.array([[1, 1, 1], [2, 2, 2]])
where elements equals to y = np.array([1, 1, 1])
. So I did this:
In: np.where(x == y)
Out: (array([0, 0, 0]), array([0, 1, 2]))
It is the correct answer. But I expect to get only index 0
because the zero element of x
is equal to y
.