cupyx.scipy.sparse.diags — CuPy 10.0.0 documentation
docs.cupy.dev › cupyxcupyx.scipy.sparse.spmatrix Notes This function differs from spdiags in the way it handles off-diagonals. The result from diags is the sparse equivalent of: cupy.diag(diagonals[0], offsets[0]) + ... + cupy.diag(diagonals[k], offsets[k]) Repeated diagonal offsets are disallowed. cupyx.scipy.sparse.kron cupyx.scipy.sparse.spdiags
scipy.sparse.diags — SciPy v1.7.1 Manual
docs.scipy.org › generated › scipyscipy.sparse.diags(diagonals, offsets=0, shape=None, format=None, dtype=None) [source] ¶ Construct a sparse matrix from diagonals. Parameters diagonalssequence of array_like Sequence of arrays containing the matrix diagonals, corresponding to offsets. offsetssequence of int or an int, optional Diagonals to set: k = 0 the main diagonal (default)
Python Examples of scipy.sparse.block_diag
www.programcreek.com › scipyPython scipy.sparse.block_diag () Examples The following are 29 code examples for showing how to use scipy.sparse.block_diag () . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.
scipy.sparse.block_diag — SciPy v1.7.1 Manual
docs.scipy.org › scipyscipy.sparse.block_diag(mats, format=None, dtype=None)[source]¶ Build a block diagonal sparse matrix from provided matrices. Parameters matssequence of matrices Input matrices. formatstr, optional The sparse format of the result (e.g., “csr”). is returned in “coo” format. dtypedtype specifier, optional The data-type of the output matrix.