On Fri, Nov 22, 2013 at 9:23 PM, Matthew Brett <matthew.br...@gmail.com>
wrote:
>
> 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

[~]
|1> x = np.array([1, None, 2], dtype=object)

[~]
|2> np.equal(x, None)
array([False,  True, False], dtype=bool)

--
Robert Kern
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to