a = np.array([1, 3, 5, 6, 9, 10, 14, 15, 56])
np.where(np.logical_and(a>=6, a<=10)) --> (array([3, 4, 5]),)
(a >= 6) & (a <=10) --> array([False, False, False, True, True, True, False, False, False])
a[(a >= 6) & (a <=10)] = 100 --> array([ 1, 3, 5, 100, 100, 100, 14, 15, 56])
参考:
[1] https://stackoverflow.com/questions/13869173/numpy-find-index-of-the-elements-within-range