aspcore.matrices.block_transpose

aspcore.matrices.block_transpose(matrix, block_size, out=None)

Transposes each block individually in a block matrix.

This function can easily be replaced by apply_blockwise. Requires square blocks, but not a square block matrix. B = [A_11^T, …, A_1r^T

A_r1^T, …, A_rc^T]

Parameters:
  • matrix (ndarray of shape (r, c)) – matrix to be transposed

  • block_size (int) – size of the square blocks

  • out (ndarray of shape (c, r), optional)

Returns:

transposed_mat

Return type:

ndarray of shape (c, r)