Overflow error implies that an operation yields a value out of the range defined for the corresponding data type. For numpy double, that range is (-1.79769313486e+308, 1.79769313486e+308). Also, for a good discussion, please read this SO post.
Example:
import numpy as np
np.seterr(all=’warn’)
print “Range of numpy double:”, np.finfo(np.double).min, np.finfo(np.double).max
A = np.array([143],dtype=’double’)
a=A[-1]
print “At the border:”, a**a
B = np.array([144],dtype=’double’)
b=B[-1]
print “Blowing out of range:”, b**b
Output:
Range of numpy double: -1.79769313486e+308 1.79769313486e+308
At the border: 1.6332525973e+308
Blowing out of range: inf
D:anacondalibsite-packagesipykernel__main__.py:9: RuntimeWarning: overflow encountered in double_scalars
Another very popular cause of a RuntimeWarning:Overflow encounter is the floating point error. For more information you can look here
Also, here’s some definitions of floating-point exceptions.
The floating-point exceptions are defined in the IEEE 754 standard 1:
Division by zero: infinite result obtained from finite numbers.
Overflow: result too large to be expressed.
Underflow: result so close to zero that some precision was lost.
Invalid operation: result is not an expressible number, typically indicates that a NaN was produced.
I hope this helps, Good Luck.