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 nan_to_num
from numpy, but than i get a lot of zero values which mess up the histogram as well.
pylab.figure()
pylab.hist(numpy.nan_to_num(A))
pylab.show()
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).