[Numpy-discussion] str == int puzzlement
Thu Jul 29 03:13:59 CDT 2010
On Wed, Jul 28, 2010 at 6:49 PM, John Salvatier
> I think this is just Python behavior; comparing python ints and strs also
> gives False:
> In : 8 == 'L'
> Out: False
Just to be clear, from:
>>> a = np.array(['a','b'])
>>> a == 1
I was expecting:
array([ False, False], dtype=bool)
> In : a = np.array(['a','b'])
> In : a + 'c'
etc - it makes sense to me that I can't add to numpy strings.
More information about the NumPy-Discussion