I am working on some molecular dynamics using Python, and the arrays tend to get pretty large. It would be helpful to have a quick check to see if certain vectors appear in the arrays. After searching for way to do this, I was surprised to see this question doesn't seem to come up. In particular, if I have something like
import numpy as np
y = [[1,2,3], [1,3,2]]
x = np.array([[1,2,3],[3,2,1],[2,3,1],[10,5,6]])
and I want to see if the specific vectors from y are present in x (not just the elements), how would I do so? Using something like
for i in y:
if i in x:
print(i)
will simply return every y array vector that contains at least one element of i. Thoughts?