[Numpy-discussion] String array equality test does not broadcast
Russel Howe
russel at appliedminds.com
Mon Feb 13 10:08:13 EST 2006
I am converting some numarray code to numpy and I noticed this behavior:
>>> from numpy import *
>>> sta=array(['abc', 'def', 'ghi'])
>>> stb=array(['abc', 'jkl', 'ghi'])
>>> sta==stb
False
I expected the same as this:
>>> a1=array([1,2,3])
>>> a2=array([1,4,3])
>>> a1==a2
array([True, False, True], dtype=bool)
I am trying to figure out how to fix this now...
More information about the NumPy-Discussion
mailing list