I have the following code, operating on some arrays. pen = 1 - (real_sum[int(i1 + t)]) / (absolute[int(i1 + t)]) if np.isnan(pen): pen = 0.0
I know that, sometimes, real_sum and absolute are 0 at the designated point, so I should get a RuntimeWarning. But, the warning is puzzling: RuntimeWarning: invalid value encountered in double_scalars pen = 0.0 Is the warning actually being raised at that point? Or can I not really trust the line reported by the warning? I have tried to replicate it in interactive terminal, but without luck, I always get it in the previous line. I am using Python 2.7 and Numpy 1.8.0. /David.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion