pub struct BsrBase<T, Data, Indices, Indptr>{
pub shape: [u64; 2],
pub blocksize: [usize; 2],
pub data: Data,
pub indices: Indices,
pub indptr: Indptr,
}Expand description
Raw representation of a scipy.sparse.bsr_matrix.
In spirit, each field is simply a Vec. (see the type alias Bsr).
This generic base class exists in order to allow you to use slices when writing.
Fields§
§shape: [u64; 2]Dimensions of the matrix [nrow, ncol].
These dimensions must be divisible by the respective elements of blocksize.
blocksize: [usize; 2]Size of the blocks in the matrix.
data: DataContains the C-order data of a shape [nnzb, block_nrow, block_ncol] ndarray.
(effectively concatenating the flattened data of all nonzero blocks, sorted by superrow)
indices: IndicesA vector of length nnzb indicating the supercolumn index of each block.
Beware: scipy does not require or guarantee that the column indices within each row are sorted.
indptr: IndptrA vector of length (nrow / block_nrow) + 1 indicating the indices which partition
Self::indices and the outermost axis of Self::data into data for each superrow.
Typically, the elements are nondecreasing, with the first equal to 0 and the final equal
to nnzb (though the set of requirements that are actually validated by scipy are
weaker and somewhat arbitrary).