For future reference: On windows, the default dtype produced by np.arange with integer arguments is np.int64 on linux, but np.int32 on windows (ref). In the code snippet below, integer_part_length = -1 for an integer value, which leads to factor = 10**8. Calculating value * factor can then lead to an overflow even for a relatively small value.
For future reference: On windows, the default dtype produced by
np.arange
with integer arguments isnp.int64
on linux, butnp.int32
on windows (ref). In the code snippet below,integer_part_length = -1
for an integervalue
, which leads tofactor = 10**8
. Calculatingvalue * factor
can then lead to an overflow even for a relatively smallvalue
.