Protocols to help generalize the python bindings. There is a clear distinction made between building a bridging type and thus allowing communication between the two systems and building a complete copy of the datastructure of one system in another. Generic objects must only bridge but if we know more about the object (like it implements java.util.Map) then we can implement either a bridge or a copy.
Atomic objects:
Standard containers:
Protocols to help generalize the python bindings. There is a clear distinction made between building a bridging type and thus allowing communication between the two systems and building a complete copy of the datastructure of one system in another. Generic objects must only bridge but if we know more about the object (like it implements java.util.Map) then we can implement either a bridge or a copy. Atomic objects: * numbers * booleans * strings-convertible things like strings, keywords, symbols Standard containers: * list * map * set * tuple (persistent vector of length less than 8)
(call-attr item att-name & args)
Call an object attribute
Call an object attribute
(as-jvm item options)
Return a pyobject implementation that wraps the python object.
Return a pyobject implementation that wraps the python object.
(as-python item options)
Aside from atom types, this means the object represented by a zero copy python mirror. May return nil. This convertible to pointers get converted to numpy implementations that share the backing store.
Aside from atom types, this means the object represented by a zero copy python mirror. May return nil. This convertible to pointers get converted to numpy implementations that share the backing store.
(->jvm item options)
Copy the python object into the jvm leaving no references. This not copying are converted into a {:type :pyobject-address} pairs.
Copy the python object into the jvm leaving no references. This not copying are converted into a {:type :pyobject-address} pairs.
(->python item options)
Copy this item into a python representation. Must never return nil. Items may fallback to as-python if copying is untenable.
Copy this item into a python representation. Must never return nil. Items may fallback to as-python if copying is untenable.
(->numpy item options)
Never return nil. Copy or otherwise, numpy or bust.
Never return nil. Copy or otherwise, numpy or bust.
(as-numpy item options)
Never copy data, operation returns nil of would require copy.
Never copy data, operation returns nil of would require copy.
(att-type-map item)
Get hashmap of att name to keyword datatype.
Get hashmap of att name to keyword datatype.
(callable? item)
(dir item)
Get sorted list of all attribute names.
Get sorted list of all attribute names.
(get-attr item item-name)
(get-item item item-name)
(has-attr? item item-name)
(has-item? item item-name)
(set-attr! item item-name item-value)
(set-item! item item-name item-value)
(as-list item)
Return a List implementation using getitem, setitem.
Return a List implementation using __getitem__, __setitem__.
(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.
(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.
Call the len attribute.
Call the __len__ attribute.
(len item)
(get-python-type item)
Return a keyword that describes the python datatype of this object.
Return a keyword that describes the python datatype of this object.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close