scipy.sparse.kronsum

scipy.sparse.kronsum(A, B, format=None)

kronecker sum of sparse matrices A and B

Kronecker sum of two sparse matrices is a sum of two Kronecker products kron(I_n,A) + kron(B,I_m) where A has shape (m,m) and B has shape (n,n) and I_m and I_n are identity matrices of shape (m,m) and (n,n) respectively.

Parameters :

A :

square matrix

B :

square matrix

format : string

format of the result (e.g. “csr”)

Returns :

kronecker sum in a sparse matrix format :

Previous topic

scipy.sparse.kron

Next topic

scipy.sparse.lil_eye

This Page