[Numpy-discussion] (no subject)

Matthew Brett matthew.brett at gmail.com
Fri Nov 22 16:23:34 EST 2013


Hi,

I'm sorry if I missed something obvious - but is there a vectorized
way to look for None in an array?

In [3]: a = np.array([1, 1])

In [4]: a == object()
Out[4]: array([False, False], dtype=bool)

In [6]: a == None
Out[6]: False

(same for object arrays),

Thanks a lot,

Matthew



More information about the NumPy-Discussion mailing list