I would like to do something like the following:
Suppose I have an array
a = np.arange(10)
Now, say I want to find, for each of the el