I have two arrays full of ID's of objects and I only want to keep the ID's of the objects the exist in both arrays. Example:
a = np.array([1, 2, 3, 2, 4, 1])
b = np.array([3, 4, 5, 6])
So ideal output from this would be an array that has searched through arrays a and b and gives me an array of only the objects that are present in both lists. Something similar to:
c = np.array([3, 4])
This array shows that the ID 3 and the ID 4 are present in both lists. Is there any way to do this?