I have a 2D NumPy array a and a list/set/1D NumPy array b. I would like to find those rows of a which contain any of b, i.e.,
import numpy as np
a = np.array([
[1, 2, 3],
[4, 5, 3],
[0, 1, 0]
])
b = np.array([1, 2])
# result: [True, False, True]
Any hints?