Python iterate through array while finding the mean of the top k elements – stackoverflow.com

Suppose I have a Python array a=[3, 5, 2, 7, 5, 3, 6, 8, 4]. My goal is to iterate through this array 3 elements at a time returning the mean of the top 2 of the three elements. Using the above ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

0 Comment to "Python iterate through array while finding the mean of the top k elements – stackoverflow.com"