Closed antipisa closed 6 years ago
This is intentional. ==
in pyq corresponds to ~
in q.
q)7h~7
0b
If you want behavior similar to that of numpy, you can use the =
function from q
>>> eq(7, 7.0)
k('1b')
note, however that =
in q uses a tolerance.
>>> eq(1-1/3, 2/3)
k('1b')
>>> 1-1/3 == 2/3
False
Comparing scalars in K requires the exact type to be match, which is not consistent with the comparison in plain q or numpy.
This comparison in kdb
q)7h = 7
returns True.From the pyq-kernel, however
and even
Ideally this should return True to be consistent with numpy: