tensorly.tensor

tensor(data, **context)

Tensor class

Returns a tensor on the specified context, depending on the backend.

Examples

>>> import tensorly as tl
>>> tl.set_backend('numpy')
>>> tl.tensor([1, 2, 3], dtype=tl.int64)
array([1, 2, 3])