cupyx.scipy.sparse.kronsum#

cupyx.scipy.sparse.kronsum(A, B, format=None)[source]#

Kronecker sum of sparse arrays/matrices A and B.

Kronecker sum is the sum of two Kronecker products kron(I_n, A) + kron(B, I_m), where I_n and I_m are identity matrices.

Parameters:
  • A (cupyx.scipy.sparse) – a square sparse object.

  • B (cupyx.scipy.sparse) – a square sparse object.

  • format (str) – the format of the returned sparse object.

Returns:

Generated sparse object with the specified format. Returns a sparse array when any input is a sparse array, else a sparse matrix (matches scipy).

Return type:

cupyx.scipy.sparse