kwgoodman / la

Meet larry, the labeled numpy array
http://pypi.python.org/pypi/la
Other
44 stars 20 forks source link

larry([1, 2]) == 'a' does not return a bool like numpy does #35

Closed kwgoodman closed 13 years ago

kwgoodman commented 13 years ago

Numpy does this (note that the second example returns a bool not a shape (3,) array):

[29] a = np.array(['w', 'h', 'y'])
I[30] a == 'y'
O[30] array([False, False,  True], dtype=bool)
I[31] a == 1
O[31] False

larry does this:

I[37] a = la.larry(['w', 'h', 'y'])
I[38] a == 'y' # Good
O[38] 
label_0
    0
    1
    2
x
array([False, False,  True], dtype=bool)
I[39] a == 1  # Bug
O[39] 
label_0
    0
    1
    2
x
False