Why doesn't numpy automatically convert int32 arrays to int64 to avoid overflow?

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?

The short answer is: performance.

Follow this notebook to learn more: