warp.sparse.bsr_set_identity#

warp.sparse.bsr_set_identity(A, rows_of_blocks=None)[source]#

Set A as the identity matrix.

Parameters:
  • A (BsrMatrix) – The sparse matrix to modify.

  • rows_of_blocks (int | None) – If provided, the matrix will be resized as a square matrix with rows_of_blocks rows and columns.

Return type:

None