title: A tedious loop looking for improvements
body: <p>in my code I need to calculate the values of a vector many times which are the mean values from different patches of another array. 
  Here is an example of my code showing how I do it but I found that it is too less-efficient in running...</p>
  
  <pre><code>import numpy as np
  vector_a = np.zeros(10)
  array_a = np.random.random((100,100))
  for i in range(len(vector_a)):
      vector_a[i] = np.mean(array_a[:,i+20:i+40]
  </code></pre>
  
  <p>Is there any way to make it more efficient? Any comments or suggestions are very welcome! Many thanks!</p>
  
  <p>-yes, the 20 and 40 are fixed.</p>