ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 13 Dec 2011 08:38:50 -0600another "how to debug" issuehttp://ask.sagemath.org/question/8550/another-how-to-debug-issue/I primarily use Sage for numerical computation, working with numpy, scipy, gsl, R, etc. as well as my own interfaces to external software. Symbolic computing won't do much good on the types of problems I'm working on. I use Sage to have access to a wider variety of plotting options, as well as the wrappers and glue code. If it were possible, I would turn off symbolic computing completely as unnecessary overhead.
I've recently discovered that when running program 1 (say aaa.sage) followed by program 2 (bbb.sage), I get the not unusual error
TypeError: unable to simplify to float approximation
So I know I just need a float() somewhere to convert a symbolic value. If I exit Sage and start again, each program runs fine alone. It's only when the one is executed after the other that the error occurs. (I assume there's a way to clear the workspace without exiting, but I can't currently find it in the documentation).
The problem is Sage does not say where the error occurs. We've all seen the standard generic error pointing to:
exec(preparse_file(open(fpath).read()) + "\n", globals)
I now have large files of developed code and don't know how to find the offending line without laborious use of print statements. Any suggestions?
burningbrightTue, 13 Dec 2011 08:38:50 -0600http://ask.sagemath.org/question/8550/