tacco.utils.gemmT

gemmT(A, B, parallel=True, sparse_result=False)[source]

Perform a matrix-matrix multiplication A @ B.T for arbitrary sparseness of A and B in parallel. Uses sparse_dot_mkl if available.

Parameters:
  • A – A 2d ndarray or a scipy sparse matrix.

  • B – A 2d ndarray or a scipy sparse matrix with the same second dimension as A.

  • parallel – Whether to run the multiplication in parallel.

  • sparse_result – Whether to return a sparse result when both inputs are sparse

Returns:

Depending on sparse_result returns either a ndarray or a scipy sparse matrix containing the result.