You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am trying to run the BytesDAWG implementation on Raspberry Pi 4 (AArch64, 64-bit, Python3.7.17) and the values returned by iteritems() seem to be different from what I get from get() method. This behavior does not happen when I run it on my laptop (x86_64, 64-bit, Python3.7.17).
Here is the sample code I am running:
import dawg
data = []
keys = [u'foo', u'bar', u'foobar', u'fo']
for item in zip(keys, range(4)):
data.append((item[0], item[1].to_bytes(3, 'little')))
bytes_dawg = dawg.BytesDAWG(data)
results = bytes_dawg.iteritems('fo')
for item in results:
print('key::', item[0], 'value from get::', bytes_dawg.get(item[0], None), ' value from iteritems', item[1])
It's output on Raspberry PI is :
Output 1
key:: fo value from get:: [b'\x03\x00\x00'] value from iteritems b'\xfc\x0c\x00\x03'
key:: foo value from get:: [b'\x00\x00\x00'] value from iteritems b'\xfc\x00\x00\x03'
key:: foobar value from get:: [b'\x02\x00\x00'] value from iteritems b'\xfc\x08\x00\x03'
While on the X86_64 machine, the output is
Output 2
key:: fo value from get:: [b'\x03\x00\x00'] value from iteritems b'\x03\x00\x00'
key:: foo value from get:: [b'\x00\x00\x00'] value from iteritems b'\x00\x00\x00'
key:: foobar value from get:: [b'\x02\x00\x00'] value from iteritems b'\x02\x00\x00'
From output 1, when I convert the byte representation( returned from iteritems()) back to int, it seems to return incorrect values.
Any ideas on why this might be happening?
The text was updated successfully, but these errors were encountered:
Hello,
I am trying to run the
BytesDAWG
implementation on Raspberry Pi 4 (AArch64, 64-bit, Python3.7.17) and the values returned byiteritems()
seem to be different from what I get fromget()
method. This behavior does not happen when I run it on my laptop (x86_64, 64-bit, Python3.7.17).Here is the sample code I am running:
It's output on Raspberry PI is :
Output 1
While on the X86_64 machine, the output is
Output 2
From output 1, when I convert the
byte
representation( returned fromiteritems()
) back toint
, it seems to return incorrect values.Any ideas on why this might be happening?
The text was updated successfully, but these errors were encountered: