For example
From this array
[1,1,2,3,1,2,-1,2,-1]
I want to remove -1
then make
[1,1,2,3,1,2,2]
I found function np.setdiff1d
, but it sorts the final result automatically.
I want to remove only -1
and keep order of other item.
Is there any good idea?