As I run my code I get these warnings, always in groups of four, sporadically. I have tried to locate the source by placing debug messages before and after certain statements to pin-point its origin.
Warning: invalid value encountered in double_scalars Warning: invalid value encountered in double_scalars Warning: invalid value encountered in double_scalars Warning: invalid value encountered in double_scalars
Is this is a Numpy warning, and what is a double scalar?
From Numpy I use
min(), argmin(), mean() and random.randn()
I also use Matplotlib
One error you may encounter in Python is: runtimewarning: invalid value encountered in double_scalars. This error occurs when you attempt to perform some mathematical operation that involves extremely small or extremely large numbers and Python simply outputs a NaN value as the result.
A double scalar is a value of type double . It is called scalar to differentiate it in numpy from double arrays.
In my case, I found out it was division by zero.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With