Indexes and masks
Comparing an array gives a mask — an array of True/False. Use a mask to pick elements:
a = np.array([3, -1, 7, -5])
print(a > 0) # [ True False True False]
print(a[a > 0]) # [3 7]
a[a < 0] = 0 # replace negatives with zero
np.clip(a, lo, hi) trims values at the edges, np.convolve slides a window over an array.