warp.sparse.bsr_get_diag#

warp.sparse.bsr_get_diag(A, out=None)[source]#

Return the array of blocks that constitute the diagonal of a sparse matrix.

Parameters:
  • A (BsrMatrixOrExpression[BlockType]) – The sparse matrix from which to extract the diagonal.

  • out (Array[BlockType] | None) – If provided, the array into which to store the diagonal blocks.

Return type:

Array[BlockType]