TEST: Float64 small || double <class 'numpy.float64'> 268435455
PASS - np buffer
PASS - jpy buffer
TEST: Float64 large || double <class 'numpy.float64'> 268435456
PASS - np buffer
FAIL - jpy buffer
ERROR: offset must be non-negative and no greater than buffer length (-2147483648)
TEST: Int64 small || long <class 'numpy.int64'> 268435455
PASS - np buffer
PASS - jpy buffer
TEST: Int64 large || long <class 'numpy.int64'> 268435456
PASS - np buffer
FAIL - jpy buffer
ERROR: offset must be non-negative and no greater than buffer length (-2147483648)
The buffer creation yields incorrect array lengths when arrays are longer than MAX_INT/TYPE_SIZE_IN_BYTES. Most likely a type that is too small is being used to compute lengths.
Note that numpy created arrays of the same size appear to function properly.
This issue was originally noted in https://github.com/deephaven/deephaven-core/issues/5403. There are many details there.
Reproducer:
Output:
The buffer creation yields incorrect array lengths when arrays are longer than
MAX_INT/TYPE_SIZE_IN_BYTES
. Most likely a type that is too small is being used to compute lengths.Note that numpy created arrays of the same size appear to function properly.