lenskit.data.CSRStructure#

class lenskit.data.CSRStructure(rowptrs, colinds, shape)#

Bases: NamedTuple

Representation of the compressed sparse row structure of a sparse matrix, without any data values.

Stability:
Caller (see Stability Levels).
Parameters:
__init__()#

Methods

__init__()

count(value, /)

Return number of occurrences of value.

extent(row)

index(value[, start, stop])

Return first index of value.

row_cs(row)

Attributes

colinds

Alias for field number 1

ncols

nnz

nrows

rowptrs

Alias for field number 0

shape

Alias for field number 2

rowptrs: ndarray#

Alias for field number 0

colinds: ndarray#

Alias for field number 1

shape: tuple[int, int]#

Alias for field number 2