clj-python / libpython-clj

Python bindings for Clojure
Eclipse Public License 2.0
1.06k stars 69 forks source link

numpy/all always returns nil (2.00-beta-1) #148

Closed KUR-creative closed 3 years ago

KUR-creative commented 3 years ago

What I did

import numpy as np, and call np/all with np/array

version: "2.00-beta-1"

user=> (require '[libpython-clj2.require :refer [require-python]])
Mar 03, 2021 9:22:50 PM libpython-clj2.python.info invoke
INFO: Detecting startup info
Mar 03, 2021 9:22:50 PM libpython-clj2.python invoke
INFO: Startup info {:lib-version "3.9", :exec-prefix "/usr", :executable "/usr/bin/python3", :libnames ("python3.9m" "python3.9"), :prefix "/usr", :base-prefix "/usr", :libname "python3.9m", :base-exec-prefix "/usr", :python-home "/usr", :version [3 9 1], :platform "linux"}
Mar 03, 2021 9:22:51 PM libpython-clj2.python invoke
INFO: Loading python library: python3.9
Mar 03, 2021 9:22:51 PM tech.v3.resource.gc invoke
INFO: Reference thread starting
nil
user=> (require-python '[numpy :as np])
:ok
user=> (np/all (np/array [true true true]))
nil
user=> (np/all (np/array [false true false]))
nil
user=> 

What I expected

It returns true, false.

What actually happened

It always returns nil. This problem occurs after the upgrade. In previous versions("2.00-alpha-7") it was fine.

cnuernber commented 3 years ago

Thanks, this is definitely a great issue. I will take a look.