title: How to create the histogram of an array with masked values, in Numpy?
body: <p>In Numpy 1.4.1, what is the simplest or most efficient way of calculating the histogram of a <em>masked</em> array?  <code>numpy.histogram</code> and <code>pyplot.hist</code> do count the masked elements, by default!</p>
  
  <p>The only simple solution I can think of right now involves creating a new array with the non-masked value:</p>
  
  <pre><code>histogram(m_arr[~m_arr.mask])
  </code></pre>
  
  <p>This is not very efficient, though, as this unnecessarily creates a new array.  I'd be happy to read about better ideas!</p>