Liking cljdoc? Tell your friends :D

libpython-clj.python


->jvmclj

(->jvm item & [options])

Copy an object into the jvm (if it wasn't there already.)

Copy an object into the jvm (if it wasn't there already.)
sourceraw docstring

->numpyclj

(->numpy item & [options])
source

->py-dictclj

(->py-dict item)
source

->py-floatclj

(->py-float item)
source

->py-fnclj

(->py-fn fn-obj)
(->py-fn fn-obj
         {:keys [method-name documentation py-self]
          :or {method-name "unnamed_function" documentation "not documented"}})

Create a python callback from a clojure fn. If clojure fn, then tuple arguments are used. If keyword arguments are desired, the pass in something derived from: libpython-clj.jna.CFunction$KeyWordFunction. If a pure fn is passed in, arguments are marshalled from python if possible and then to-python in the case of successful execution. An exception will set the error indicator.

Create a python callback from a clojure fn.
If clojure fn, then tuple arguments are used.  If keyword arguments are desired,
the pass in something derived from: libpython-clj.jna.CFunction$KeyWordFunction.
If a pure fn is passed in, arguments are marshalled from python if possible and
then to-python in the case of successful execution.  An exception will set the error
indicator.
sourceraw docstring

->py-listclj

(->py-list item-seq)
source

->py-longclj

(->py-long item)
source

->py-stringclj

(->py-string item)
source

->py-tupleclj

(->py-tuple item-seq)
source

->pythonclj

(->python item & [options])

Completely convert a jvm object to a python copy.

Completely convert a jvm object to a python copy.
sourceraw docstring

add-moduleclj

(add-module modname)

Add a python module. Returns a bridge

Add a python module.  Returns a bridge
sourceraw docstring

as-jvmclj

(as-jvm item & [options])

Bridge a python object into the jvm. Attempts to build a jvm bridge that 'hides' the python type. This bridge is lazy and noncaching so use it wisely; it may be better to just copy the type once into the JVM. Bridging is recursive so any subtypes are also bridged if possible or represented by a hashmap of {:type :value} if not.

Bridge a python object into the jvm.  Attempts to build a jvm bridge that 'hides' the
python type.  This bridge is lazy and noncaching so use it wisely; it may be better to
just copy the type once into the JVM.  Bridging is recursive so any subtypes are also
bridged if possible or represented by a hashmap of {:type :value} if not.
sourceraw docstring

as-listclj

(as-list item)

Return a List implementation using getitem, setitem.

Return a List implementation using __getitem__, __setitem__.
sourceraw docstring

as-mapclj

(as-map item)

Return a Map implementation using getitem, setitem. Note that it may be incomplete especially if the object has no 'keys' attribute.

Return a Map implementation using __getitem__, __setitem__.  Note that it may be
incomplete especially if the object has no 'keys' attribute.
sourceraw docstring

as-numpyclj

(as-numpy item & [options])
source

as-pythonclj

(as-python item & [options])

Bridge a jvm object into python

Bridge a jvm object into python
sourceraw docstring

as-tensorclj

(as-tensor item)

Return a tech.v2.tensor object from the item that shares the data backing store.

Return a tech.v2.tensor object from the item that shares the data backing store.
sourceraw docstring

att-type-mapclj

(att-type-map item)

Get hashmap of att name to keyword datatype.

Get hashmap of att name to keyword datatype.
sourceraw docstring

callclj

(call callable & args)
source

call-attrclj

(call-attr item att-name & args)

Call an object attribute

Call an object attribute
sourceraw docstring

call-attr-kwclj

(call-attr-kw item att-name arglist kw-map)
source

call-kwclj

(call-kw callable arglist kw-args)
source

callable?clj

(callable? item)
source

dirclj

(dir item)

Get sorted list of all attribute names.

Get sorted list of all attribute names.
sourceraw docstring

finalize!clj

(finalize!)
source

get-attrclj

(get-attr item item-name)
source

get-itemclj

(get-item item item-name)
source

has-attr?clj

(has-attr? item item-name)
source

has-item?clj

(has-item? item item-name)
source

import-moduleclj

(import-module modname)

Import a python module. Returns a bridge

Import a python module.  Returns a bridge
sourceraw docstring

initialize!clj

(initialize! & {:keys [program-name no-io-redirect?]})
source

lenclj

(len item)
source

libpython-clj-module-nameclj

source

module-dictclj

(module-dict module)

Get the module dictionary. Returns bridge.

Get the module dictionary.  Returns bridge.
sourceraw docstring

python-typeclj

(python-type item)
source

run-simple-stringclj

(run-simple-string program & {:keys [globals locals]})

Run a simple string returning boolean 1 or 0. Implemented in cpython as:

PyObject *m, *d, *v; m = PyImport_AddModule("main"); if (m == NULL) return -1; d = PyModule_GetDict(m); v = PyRun_StringFlags(command, Py_file_input, d, d, flags); if (v == NULL) { PyErr_Print(); return -1; } Py_DECREF(v); return 0;

Run a simple string returning boolean 1 or 0.
Implemented in cpython as:

  PyObject *m, *d, *v;
  m = PyImport_AddModule("__main__");
  if (m == NULL)
      return -1;
  d = PyModule_GetDict(m);
  v = PyRun_StringFlags(command, Py_file_input, d, d, flags);
  if (v == NULL) {
      PyErr_Print();
      return -1;
  }
  Py_DECREF(v);
  return 0;
sourceraw docstring

run-stringclj

(run-string program & {:keys [globals locals]})

If you don't know what you are doing, this will sink you. See documentation for run-simple-string.

If you don't know what you are doing, this will sink you.  See documentation for
run-simple-string.
sourceraw docstring

set-attr!clj

(set-attr! item item-name item-value)
source

set-item!clj

(set-item! item item-name item-value)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close