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)
Sparse matrices (scipy.sparse) — SciPy v1.7.1 Manual
https://docs.scipy.org/doc/scipy/reference/sparse.htmlspdiags (data, diags, m, n[, format]) Return a sparse matrix from diagonals. block_diag (mats[, format, dtype]) Build a block diagonal sparse matrix from provided matrices. tril (A[, k, format]) Return the lower triangular portion of a matrix in sparse format. triu (A[, k, format]) Return the upper triangular portion of a matrix in sparse format
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.
scipy.sparse.diags — SciPy v1.4.0 Reference Guide
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)
scipy.sparse.diags — SciPy v0.16.1 Reference Guide
docs.scipy.org › generated › scipyOct 24, 2015 · scipy.sparse.diags — SciPy v0.16.1 Reference Guide This is documentation for an old release of SciPy (version 0.16.1). Read this page in the documentation of the latest stable release (version 1.7.1). scipy.sparse.diags ¶ scipy.sparse.diags(diagonals, offsets, shape=None, format=None, dtype=None) [source] ¶ Construct a sparse matrix from diagonals.