clj-python / libpython-clj

Python bindings for Clojure
Eclipse Public License 2.0
1.05k stars 68 forks source link

->jvm on ndarray of type 'object' fails #187

Open behrica opened 2 years ago

behrica commented 2 years ago

See https://clojurians.zulipchat.com/#narrow/stream/215609-libpython-clj-dev/topic/-.3Ejvm.20on.20ndarray.20of.20type.20'object'.20fails

behrica commented 1 year ago

seems to work now:

(require-python '[numpy])
(py/->jvm
 (numpy/array [] :dtype :object))
;; => []
cnuernber commented 1 year ago

I think it will still fail if you have the zero-copy bindings loaded.

behrica commented 1 year ago

Indeed, this still fails:

(require-python '[numpy])
(require '[libpython-clj2.python.np-array])
(py/->jvm
 (numpy/array [] :dtype :object))