Crate sparsetools Copy item path Source coo csc csr dok graph Complex Float Integer Nonzero Scalar coo_matvec Compute Y += A*X for COO matrix A and dense vectors X,Y coo_tocsr Compute B = A for COO matrix A, CSR matrix B coo_todense Compute B += A for COO matrix A, dense matrix B csc_diagonal csc_matmat csc_matmat_maxnnz csc_matvec Compute Y += A*X for CSC matrix A and dense vectors X,Y csc_matvecs Compute Y += A*X for CSC matrix A and dense block vectors X,Y csc_tocsr csr_add_csr csr_binop_csr Compute C = A (binary_op) B for CSR matrices A,B where the column
indices with the rows of A and B are known to be sorted. csr_binop_csr_canonical Compute C = A (binary_op) B for CSR matrices that are in the
canonical CSR format. Specifically, this method requires that
the rows of the input matrices are free of duplicate column indices
and that the column indices are in sorted order. csr_binop_csr_general Compute C = A (binary_op) B for CSR matrices that are not
necessarily canonical CSR format. Specifically, this method
works even when the input matrices have duplicate and/or
unsorted column indices within a given row. csr_column_index1 Slice columns given as an array of indices (pass 1).
This pass counts idx entries and computes a new indptr. csr_column_index2 Slice columns given as an array of indices (pass 2).
This pass populates indices/data entries for selected columns. csr_count_diagonals Count the number of occupied diagonals in CSR matrix A csr_diagonal Extract k-th diagonal of CSR matrix A csr_div_csr csr_eliminate_zeros Eliminate zero entries from CSR matrix A csr_eq_csr csr_ge_csr csr_gt_csr csr_has_canonical_format Determine whether the matrix structure is canonical CSR.
Canonical CSR implies that column indices within each row
are (1) sorted and (2) unique. Matrices that meet these
conditions facilitate faster matrix computations. csr_has_sorted_indices Determine whether the CSR column indices are in sorted order. csr_le_csr csr_lt_csr csr_matmat Compute CSR entries for matrix C = A*B. csr_matmat_maxnnz Compute C = A*B for CSR matrices A,B csr_matvec Compute Y += A*X for CSR matrix A and dense vectors X,Y csr_matvecs Compute Y += A*X for CSR matrix A and dense block vectors X,Y csr_max_csr csr_min_csr csr_mul_csr csr_ne_csr csr_row_index Slice rows given as an array of indices. csr_row_slice Slice rows given as a (start, stop, step) tuple. csr_scale_columns Scale the columns of a CSR matrix in place csr_scale_rows Scale the rows of a CSR matrix in place csr_select csr_sort_indices Sort CSR column indices inplace csr_sub_csr csr_sum_duplicates Sum together duplicate column entries in each row of CSR matrix A csr_tocoo csr_tocsc Compute B = A for CSR matrix A, CSC matrix B csr_todense Compute B += A for CSR matrix A, C-contiguous dense matrix B expandptr Expand a compressed row pointer into a row array get_csr_submatrix Binop