numpy.histogram breaks on nans