There's a profiling script at the end of scimath.interpolate.interpolate, but running this script via python -m scimath.interpolate.interpolate produces the following slightly worrying warning about "unpredictable behaviour".
(scimath) mdickinson@mirzakhani scimath % python -m scimath.interpolate.interpolate
/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py:127: RuntimeWarning: 'scimath.interpolate.interpolate' found in sys.modules after import of package 'scimath.interpolate', but prior to execution of 'scimath.interpolate.interpolate'; this may result in unpredictable behaviour
warn(RuntimeWarning(msg))
After adding some print statements for debugging purposes, it's possible to verify thatpython -m scimath.interpolate.interpolate does indeed execute the code in scimath/interpolate/interpolate.py twice. (In this particular case that doesn't have any obviously bad side-effects, but the warning is still worrying, and it's easy to fix.)
~This PR moves the profiling script to its own module. To run the profiling script, run python -m scimath.interpolate.profile, which should now be warning-free.~
EDIT: Following discussion, this PR simply deletes the profiling code.
There's a profiling script at the end of
scimath.interpolate.interpolate
, but running this script viapython -m scimath.interpolate.interpolate
produces the following slightly worrying warning about "unpredictable behaviour".After adding some
print
statements for debugging purposes, it's possible to verify thatpython -m scimath.interpolate.interpolate
does indeed execute the code inscimath/interpolate/interpolate.py
twice. (In this particular case that doesn't have any obviously bad side-effects, but the warning is still worrying, and it's easy to fix.)~This PR moves the profiling script to its own module. To run the profiling script, run
python -m scimath.interpolate.profile
, which should now be warning-free.~EDIT: Following discussion, this PR simply deletes the profiling code.