integer overflow on win64
The conda-forge test pipeline on win64 fails with the following traceback:
def test_conversion():
for src_dtype in dtypes:
for dest_dtype in dtypes:
src = ta.zeros(3, src_dtype)
tsrc = tuple(src)
npsrc = np.array(tsrc)
impossible = src_dtype is complex and dest_dtype in [int, float]
for s in [src, tsrc, npsrc]:
if impossible:
raises(TypeError, ta.array, s, dest_dtype)
else:
dest = ta.array(s, dest_dtype)
assert isinstance(dest[0], dest_dtype)
assert src == dest
# Check correct overflow detection. We assume a typical architecture:
# sys.maxsize is also the maximum size of an integer held in a tinyarray
# array, and that Python floats are double-precision IEEE numbers.
for n in [10**100, -10**100, 123 * 10**20, -2 * sys.maxsize,
sys.maxsize + 1, np.array(sys.maxsize + 1),
-sys.maxsize - 2]:
raises(OverflowError, ta.array, n, int)
# Check that values just below the threshold of overflow work.
for n in [sys.maxsize, np.array(sys.maxsize),
-sys.maxsize - 1, np.array(-sys.maxsize - 1)]:
> ta.array(n, int)
E OverflowError: Python int too large to convert to C long
test_tinyarray.py:180: OverflowError