Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Seems that np.float64 implements the buffer protocol, i.e. it can be accepted 
in any function that supports the buffer protocol (for example 
b'abc\xc1\x1c=~o\xd3\xd5?def'.index(np.float64(0.34103))). And pickle.loads() 
is one of such functions, it accepts bytes, bytearray, memoryview, mmap, etc.

There is no bug in Python, and I suppose it is an intended behavior in NumPy. 
It just happens that two features are used together in wrong way. The bug is in 
your code which passes wrong argument to pickle.loads().

----------
nosy: +serhiy.storchaka
resolution:  -> not a bug

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42165>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to