Numpy types and object comparison

Matthew Brett matthew.brett at gmail.com
Sat Oct 7 07:15:36 CDT 2006


Hi,

I am sorry, I am still struggling with object arrays - and here -
numpy data types.  Is there any easy way to explain why comparisons
with numpy types give a different output from comparisons with
non-numpy types:

In [108]:oa = zeros((1,), dtype=object)

In [109]:oa == int
Out[109]:array([False], dtype=bool)

In [110]:oa == int32
Out[110]:False

Many thanks for your patience,

Matthew

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV




More information about the Numpy-discussion mailing list