ctgk / PRML

PRML algorithms implemented in Python
MIT License
11.43k stars 3.25k forks source link

How to step into the source code like polynomial.py in prml folder when debugging? #41

Closed Keneyr closed 10 months ago

Keneyr commented 10 months ago

I tried to debug ch01_Introduction.ipynb, set a breakpoint at X_train = feature.transform(x_train), then press F11 to enter the souce code function

image

but polynomial.py file show me like that, this polynomial.py file is located at /site-packages/prml-0.0.1-py3.8.egg :

image

I know that .egg file is a zip file for py source code, but is there any way to step into the right-readble source code in my project folder?

Thanks!

Keneyr commented 10 months ago

oh my gosh, i fix it...

Just copy the folder prml in your project ,the path is like PRML\build\lib\prml, to the anaconda libs path like this : anaconda3\envs\PRML\Lib\site-packages is ok, the .egg file is also in this anaconda site-packages path.

By the way, i'm using .py file debugging, not .ipynb, .ipynb is not that handy for me..