import numpy as np a = np.array([6.0, 2.1, 8.2, 10.3, 5.4, 1.5, 7.6, 3.7, 9.8])
a[a < 5]
array([2.1, 1.5, 3.7])
a[a >= 8.2]
array([ 8.2, 10.3, 9.8])
a[a == 6.0]
array([6.])