Skip to content
fn

tensor_from_python

int tensor_from_python(int obj, const int & what)

The tensor a Python value holds — a TensorImpl, or a lucid.Tensor through its impl — or null for None. The one Python → TensorImpl conversion of the autograd layer.

Raises

:type_error
obj is anything else; the message names what, the value's role ("a tensor hook's result", ...).