How would I go about removing elements from an array based on the contents of another array for example:
a = np.array([25, 2, 49, 3,90, 24, 45, 23, 9])
b = [3,45,23]
...
In order to get the output:
>>>a
25, 2, 49,90,24, 9
It doesn't really matter to me if b is a regular list or a numpy array. I've seen lots of similar questions but they all remove array elements based on index or if they do remove them based on the element the list gets sorted as a result eg by using np.setdiff1d. I want to know if there are any numpy methods that will let me do something similar to np.setdiff1d but without sorting the array. If not is there another way to remove the elements as I'm not to familiar with numpy. Thanks in advance