hyoxt121 added the comment:
Can anyone explain "pickle.loads(np.float64(0.34104))" prints "True"?
--
___
Python tracker
<https://bug
hyoxt121 added the comment:
I will close and reopen again with some modification.
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/i
Change by hyoxt121 :
--
title: Question about converting numpy float to bytes (bug??) -> closed (reopen
with other issue)
___
Python tracker
<https://bugs.python.org/issu
New submission from hyoxt121 :
Hi! In order to deserialize bytes object, we use pickle.loads():
import pickle
import numpy as np
pickle.loads(np.float64(0.34103))
and the expected result is like below (because np.float64(0.34103) is not bytes
objects, appropriate errors are expected
hyoxt121 added the comment:
If so, regardless of invalid operation, can anyone explain why
"pickle.loads(np.float64(0.34104))" prints "True"?
--
___
Python tracker
<https://bug
New submission from hyoxt121 :
Hi! In order to convert numpy float to bytes, we are using tobytes() method:
import pickle
import numpy as np
pickle.loads(np.float64(0.34103))
and the expected result is like below (because np.float64(0.34103) is not bytes
objects, appropriate errors