Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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])
 
PREVIOUS NEXT
Tagged: #delete #values #condition #numpy
ADD COMMENT
Topic
Name
5+3 =