I have a matrix x_faces
with 3 columns and N elements (in this example 4).
Per row I want to know if it contains any of the elements from array matches
x_faces = [[ 0, 43, 446],
[ 8, 43, 446],
[ 0, 10, 446],
[ 0, 5, 425]
]
matches = [8, 10, 44, 425, 440]
Which should return this:
results = [
False,
True,
True,
True
]
I can think of a for loop that does this, but is there a neat way to do this in python?