py4cl2-cffi icon indicating copy to clipboard operation
py4cl2-cffi copied to clipboard

`plt.plot` hangs

Open jcguu95 opened this issue 5 months ago • 8 comments

In the following example given in README, my lisp hangs for more than 1 minute when I call (pycall "plt.plot" [elided]). I could not locate the cause. But I can tell that #'import-module works well, since if I skip pycall and just do (pycall "plt.show"), it works as expected. On the other hand, I have also tried to plt.plot in a python repl; it works fine as well.

PY4CL2-CFFI> (import-module "matplotlib.pyplot" :as "plt")
T
PY4CL2-CFFI> (pycall "plt.plot"
                     (iota 10)
                     (mapcar (lambda (x) (* x x))
                             (iota 10)))
#(#<PYTHON-OBJECT :type <class 'matplotlib.lines.Line2D'>
  Line2D(_line0)
 {1006670F83}>)
PY4CL2-CFFI> (pycall "plt.show")
#<PYTHON-OBJECT :type <class 'NoneType'>
  None
 {1006672273}>

jcguu95 avatar Feb 20 '24 00:02 jcguu95