str == int puzzlement
29 Jul
2010
29 Jul
'10
1:42 a.m.
Hi, Please forgive me if this is obvious, but this surprised me: In [15]: x = np.array(['a', 'b']) In [16]: x == 'a' # this was what I expected Out[16]: array([ True, False], dtype=bool) In [17]: x == 1 # this was strange to me Out[17]: False Is it easy to explain why this is? Thanks a lot, Matthew
4979
Age (days ago)
4982
Last active (days ago)
9 comments
5 participants
participants (5)
-
Friedrich Romstedt
-
John Salvatier
-
Keith Goodman
-
Matthew Brett
-
Sturla Molden