Threshold numpy array, find windows
Here's one way:
# Create a mask
In [42]: mask = (a[1] >= 4)
# find indice of start and end of the threshold
In [43]: ind = np.where(np.diff(mask))[0]
# add 1 to starting indices
In [44]: ind[::2] += 1
# find and reshape the result
In [45]: result = a[0][ind].reshape(-1, 2)
In [46]: result
Out[46]:
array([[52, 54],
[59, 61]])