mph- / lcapy

Lcapy is a Python package for symbolic linear circuit analysis and signal processing. It uses SymPy for symbolic mathematics.
GNU Lesser General Public License v2.1
226 stars 45 forks source link

'.sympy' on an expression causes Jupyter Notebook to hang #135

Open anaidan opened 6 days ago

anaidan commented 6 days ago

My notebook hangs 100% of the time I try this:

from lcapy import a = 2 t + 3 a.sympy

I tried not doing a * import, but no luck there either. Any suggestions?

mph- commented 6 days ago

Bother, this works for me. What do you get running show_version() ?

anaidan commented 6 days ago

Thanks for the quick response:

Python: 3.11.5 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:26:23) [MSC v.1916 64 bit (AMD64)] SymPy: 1.11.1 NumPy: 1.24.3 Matplotlib: 3.7.2 SciPy: 1.11.1 Lcapy: 1.23

mph- commented 6 days ago

Would you mind trying to update SymPy? I;m currently using 1.11.1

mph- commented 6 days ago

Oops, that's your version! I'm using 1.12

anaidan commented 6 days ago

Just updated both Python and SymPy, still no luck. Things are working fine on a different computer. It must be something with my Anaconda setup...

Python: 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:03:56) [MSC v.1929 64 bit (AMD64)] SymPy: 1.12 NumPy: 1.26.4 Matplotlib: 3.8.4 SciPy: 1.13.1 Lcapy: 1.23

mph- commented 6 days ago

To find where it hangs, you could try

from lcapy import t
t.pdb().sympy

and step through in the Python debugger...