title: Numpy mean with condition
body: <p>I have algorithm of calculating average speed in pure python:</p>
  <pre><code>speed = [...]
  avg_speed = 0.0
  speed_count = 0
  
  for i in speed:
      if i &gt; 0: # I dont need zeros
          avg_speed += i
          speed_count += 1
  
  if speed_count == 0:
      return 0.0
  
  return avg_speed / speed_count
  </code></pre>
  <p>Is there any way to rewrite this functions with Numpy?</p>