You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would really appreciate some help. I want to completely clear Python state after each script execution so a fresh interpreter is ready for the next time a script is executed. I've used Demo34 as an example for completely destroying and recreating an engine for each script execution, however, this causes problems with NumPy because NumPy doesn't like being finalized and then reinitialized.
This simple problem can be recreated by running demo34, modifying the Python script to simply "import numpy" and nothing else, execute, and then switch to and from a different python version to cause it to destroy and recreate the Python engine.
Since we're completely recreating the Python engine, I would have expected all previous memory and state to be cleared. How come NumPy knows it's been previously run?
Is there a better way of completely clearing state when re-running Python scripts in P4D? One which might not cause issues for NumPy? I need to completely clear state, because otherwise I get other issues because old variables are hanging around in memory. I'd prefer everything to be cleaned up after each run.
Thank you.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Hello!
I would really appreciate some help. I want to completely clear Python state after each script execution so a fresh interpreter is ready for the next time a script is executed. I've used Demo34 as an example for completely destroying and recreating an engine for each script execution, however, this causes problems with NumPy because NumPy doesn't like being finalized and then reinitialized.
This simple problem can be recreated by running demo34, modifying the Python script to simply "import numpy" and nothing else, execute, and then switch to and from a different python version to cause it to destroy and recreate the Python engine.
Thank you.
The text was updated successfully, but these errors were encountered: