lenskit.math.sparse#

Sparse matrix utility functions.

Functions

torch_sparse_from_scipy(M[, layout])

Convert a SciPy sps.coo_array into a torch sparse tensor.

lenskit.math.sparse.torch_sparse_from_scipy(M, layout='coo')#

Convert a SciPy sps.coo_array into a torch sparse tensor.

Stability:
Internal (see Stability Levels).
Parameters:
Return type:

Tensor