[Numpy-discussion] BUG(?): array([None])==None test

Travis Oliphant oliphant at ee.byu.edu
Fri Feb 10 16:52:02 CST 2006


Pearu Peterson wrote:

>
> Hi,
>
> While converting some Numeric based code to numpy, I noticed that
> in Numeric
>
>   array([None])==None
>
> returns array([1]) while in numpy it returns False.
>
> Is this expected behaviour or a bug?


It's expected behavior.

If you do an equality test on None then False is returned while True is 
returned on an inequality test to None.

-Travis








More information about the Numpy-discussion mailing list