I am trying to trace the origin of a python error message that I am getting when I try to run my code test.py.
The module (which is called by test.py) that I am trying to trace from the error output is apparently:
build/bdist.linux-x86_64/egg/george/gp.py
The error message snippet:
File "build/bdist.linux-x86_64/egg/george/gp.py", line 498, in
predict
- I can find
build/bdist.linux-x86_64/but it is empty. Maybe it's not the 'right one'. - I have also found a different version of
gp.py, but when I make changes to that, nothing happens, sotest.pyis not calling that version.
All I want to do is find the code in which the error is occurring so that I can add some more outputs to it to figure out what is going wrong.
Here is the error message:
Traceback (most recent call last):
File "test.py", line 213, in <module>
mumc, dummy = gp1.predict(residuals, dates, kernel = kernelprime )
File "build/bdist.linux-x86_64/egg/george/gp.py", line 511, in predict
File "build/bdist.linux-x86_64/egg/george/solvers/basic.py", line 87, in apply_inverse
File "/home/me/.local/lib/python2.7/site-packages/scipy/linalg/decomp_cholesky.py", line 174, in cho_solve
b1 = asarray_chkfinite(b)
File "/home/me/.local/lib/python2.7/site-packages/numpy/lib/function_base.py", line 1219, in asarray_chkfinite
"array must not contain infs or NaNs")
ValueError: array must not contain infs or NaNs
So obviously, at some point down the line, I am feeding an array that contains infs or NaNs into some scipy or numpy code that it doesn't like. But to see why the values are infs or NaNs in the first place, it seems like whatever is going wrong is happening in the predict module.
(gp1 is a class which is also defined in the gp.py code!)
from Can't locate a python script from error message
No comments:
Post a Comment