[Numpy-discussion] ignore NAN in numpy.true_divide()

David Cournapeau cournape at gmail.com
Mon Dec 5 17:45:10 EST 2011


On Mon, Dec 5, 2011 at 5:29 PM, questions anon <questions.anon at gmail.com> wrote:
> Maybe I am asking the wrong question or could go about this another way.
> I have thousands of numpy arrays to flick through, could I just identify
> which arrays have NAN's and for now ignore the entire array. is there a
> simple way to do this?

Doing np.any(np.isnan(a)) for an array a should answer this exact question

David



More information about the NumPy-Discussion mailing list