human
python: check if an numpy array contains any element of another array
assistant
Here is some code to check if a numpy array `a1` contains any element of another array `a2`

np.any(np.in1d(a1, a2))

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.