title: Fastest way to zero out low values in array?
body: <p>So, lets say I have 100,000 float arrays with 100 elements each.  I need the highest X number of values, BUT only if they are greater than Y.  Any element not matching this should be set to 0.   What would be the fastest way to do this in Python?  Order must be maintained.  Most of the elements are already set to 0.</p>
  
  <p>sample variables:</p>
  
  <pre><code>array = [.06, .25, 0, .15, .5, 0, 0, 0.04, 0, 0]
  highCountX = 3
  lowValY = .1
  </code></pre>
  
  <p>expected result:</p>
  
  <pre><code>array = [0, .25, 0, .15, .5, 0, 0, 0, 0, 0]
  </code></pre>