I have slice of numbers like [1, -13, 9, 6, -21, 125]. I want to find elements that are less than zero then delete them.
It can be done by straightforward way: just iterate through slice and if element less than zero -> delete it. But it computationally costly because of possible slice changing on each step.
Is there any elegant way of doing it like numpy.where(array, condition) and numpy.delete?