Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python find equal rows of two numpy arrays

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)
 
PREVIOUS NEXT
Tagged: #python #find #equal #rows #numpy #arrays
ADD COMMENT
Topic
Name
4+3 =