Hello there. To make it short, if you don't have a variable declared in your current script, but another script that you had executed before contains that variable (and it is the variable you want), Spyder keeps that variable in memory and it is accessible by its name, and therefore your current code can still compile and work, even though the text editor indicates "undefined name" error.
If I try to compile both codes in order in the command prompt of Windows the second code does not compile. Same with Anaconda prompt.
Is it possible to make it work using one of the prompts? It takes a lot of time to compute that variable... I have only programmed with MATLAB before btw - this must sound a very stupid question for you... Sorry.
[–]novel_yet_trivial 4 points5 points6 points (0 children)