Matlab does not recognise changes in user-defined python modules. Can I work around this without restarting Matlab or using clear classes?
이전 댓글 표시
I am calling a python function myfun from the module mymodule using the syntax:
y = py.mymodule.myfun(x)
This works fine usually. But if I make some changes to myfun then execute the code again, Matlab continues to call the old version of myfun.
Other posts dealing with similar issues (including the official Matlab documentation) suggest solutions involving restarting Matlab or a call to clear classes, with possibly the most generally useful one being this.
However, I am wondering if there is a solution that erases the need to explicitly call some sort of reload function whenever it might be necessary? So that "production" code might be identical to the last iteration of "development" code?
답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!