Utility class to manage the adjacency matrix regardless of if its dense or sparse
Class that handles the adjacency matrix for the model, generalizes between dense/sparse.
_csr_diag(mat, out=None, indptr_sorted=False)
Get the diagonal of a scipy/cupy CSR sparse matrix quickly
Check if a cupy/scipy CSR sparse matrix has its indices sorted
_read_edge_mat(G, weight_attr='weight', sparse=True, a_min=0.0)
Read the adj matrix of a networkx graph and convert it to the cupy/scipy format.
property refering to the dense/sparse matrix
property refering to the cache diagional of the matrix
Normalize A along a given axis and keep the cache A_diag in sync
Apply a normal perturbation to the matrix (and keep its diag in sync)
Deprecated since version 0.9.0: As of cupy==9.0.0a2 this functionality is provided by scipy.sparse.csr.csr_matrix.diagonal()