Numpy types and object comparison

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


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

Many thanks for your patience,


Take Surveys. Earn Cash. Influence the Future of IT
Join's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash

More information about the Numpy-discussion mailing list