intent: How to find all elements in a numpy 2-dimensional array that match a certain list?
rewritten_intent: replace all elements in array `A` that are not present in array `[1, 3, 4]` with zeros
snippet: np.where(np.in1d(A, [1, 3, 4]).reshape(A.shape), A, 0)