I'm trying to use the intersect1d function with a view on a 2D array to find the intersection of it's first column with another 1D array, maintaining its 2nd column in the end result. However I'm stuck trying to construct the view.
Example input:
a1 = np.array([[1,2],[3,4],[4,9]], dtype=np.uint32)
a2 = np.array([8,3,8,1,0,9,3,2], dtype=np.uint32)
The desired result is:
[[1,2],[3,4]]