libpython-clj icon indicating copy to clipboard operation
libpython-clj copied to clipboard

docs on usage are out of sync and fail due to API changs in v2

Open joinr opened this issue 4 years ago • 1 comments

https://clj-python.github.io/libpython-clj/Usage.html

(require '[libpython-clj.python
                 :refer [as-python as-jvm
                         ->python ->jvm
                         get-attr call-attr call-attr-kw
                         get-item att-type-map
                         call call-kw initialize!
                         as-numpy as-tensor ->numpy
                         run-simple-string
                         add-module module-dict
                         import-module
                         python-type]])

fails.

Removing call, as-numpy, as-tensor, ->numpy and changing namespace works:

(require '[libpython-clj2.python
                 :refer [as-python as-jvm
                         ->python ->jvm
                         get-attr call-attr call-attr-kw
                         get-item
                         initialize!
                         run-simple-string
                         add-module module-dict
                         import-module
                         python-type]])

I haven't checked any other examples.

joinr avatar Jul 18 '21 08:07 joinr

I take a look at this, with the aim to fix it

behrica avatar Nov 13 '21 13:11 behrica

I fixed them all with d37f06c48b75365f5dcb0dc2896cc9c3daabf89a

and propose to close the issue.

behrica avatar Sep 24 '22 17:09 behrica

Closed. I am sure there are more places but this is fine for now.

cnuernber avatar Sep 24 '22 17:09 cnuernber