np where delete code example
Example 1: delete values with condition in numpy
a = np.array([1,2,3,4,5,6])
out = np.logical_not(a < 3)
print(out) # array([False, False, True, True, True, True])
print(a[out]) # array([3, 4, 5, 6])
Example 2: remove all the elements from a numpy array python
np_array = np.array([])