I have an array A, and I have a list of slicing indices (s,t), let's called this list L.
I want to find the 85 percentiles of A[s1:t1], A[s2:t2] ...
Is there a way to vectorize these operations in numpy?
ans = []
for (s,t) in L:
ans.append( numpy.percentile( A[s:t], 85) );
looks cumbersome.
Thanks a lot!
PS: it's safe to assume s1 < s2 .... t1 < t2 ..... This is really just a sliding window percentile problem.