In the example below, calculating the dot product of two vectors with a million elements each works fine in Python, but leads to an incorrect result in Numpy, due to integer overflow.
Why doesn’t NumPy automatically convert the int32
array in int64
?