Eryk Sun <[email protected]> added the comment:
shared_memory is not the problem here. Your example assumes that a.dtype is
int64, but a numpy array defaults to "the minimum type required to hold the
objects in the sequence", and the actual minimum depends on the size of the
platform `long`. In Windows, a `long` is always 32-bit, regardless of whether
the process is 32-bit or 64-bit. If [1, 1], [2, 3], and [5, 8] are stored as
int32 values, then we have the following values when unpacked as 64-bit:
>>> int.from_bytes(b'\x01\x00\x00\x00\x01\x00\x00\x00', 'little')
4294967297
>>> int.from_bytes(b'\x02\x00\x00\x00\x03\x00\x00\x00', 'little')
12884901890
>>> int.from_bytes(b'\x05\x00\x00\x00\x08\x00\x00\x00', 'little')
34359738373
----------
nosy: +eryksun
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39655>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com