Tracing Python warnings/errors to a line number in numpy and scipy -
i getting error:
warning: invalid value encountered in log
from python , believe error thrown numpy (using version 1.5.0). however, since calling "log" function in several places, i'm not sure error coming from. there way numpy print line number generated error?
i assume warning caused taking log of number small enough rounded 0 or smaller (negative). right? usual origin of these warnings?
putting np.seterr(invalid='raise')
in code (before errant log
call) cause numpy raise exception instead of issuing warning. give traceback error message , tell line python executing when error occurred.
Comments
Post a Comment