title: pylab histogram get rid of nan
body: <p>I have a problem with making a histogram when some of my data contains "not a number" values. I can get rid of the error by using <code>nan_to_num</code> from numpy, but than i get a lot of zero values which mess up the histogram as well.</p>
  
  <pre><code>pylab.figure()
  pylab.hist(numpy.nan_to_num(A))
  pylab.show()
  </code></pre>
  
  <p>So the idea would be to make another array in which all the nan values are gone, or to just mask them in the histogram in some way (preferrably with some builtin method).</p>