Setup:
- Emacs 25.2.1 on Windows 10
- Pymacs 0.25
- Anaconda Python 3.5.1
Pymacs is running fine. I can run pymacs-eval and pymacs-exec commands successfully from Emacs. For example, evaluating the following works:
(require 'pymacs)
(pymacs-exec "from scipy.stats import norm;")
(pymacs-exec "import numpy as np;")
(pymacs-exec "np.set_printoptions(threshold=np.nan);")
(pymacs-eval "norm.ppf(0.95)")
The last line returns
1.6448536269514722
The problem I am having is that some standard Python 3.x statements are returning something strange back to Emacs. In particular, if I run
(pymacs-eval "import numpy as np;")
(pymacs-eval "np.max(np.array([[1,1],[2,4]]))")
I get back
(pymacs-python . 1479)
If you run
(pymacs-load "numpy" "np-")
(np-max (np-array '((1 1) (2 4))))
The last line returns
(pymacs-python . 1479)
This seems to happen whenever I try passing any type of list from Emacs Lisp to Python via Pymacs. Does anybody know what these "(pymacs-python . n)" cons cells mean?