warp.sparse.bsr_zeros#
- warp.sparse.bsr_zeros(rows_of_blocks, cols_of_blocks, block_type, device=None)[source]#
Construct and return an empty BSR or CSR matrix with the given shape.
- Parameters:
bsr – The BSR or CSR matrix to set to zero.
rows_of_blocks (int) – Number of rows of blocks.
cols_of_blocks (int) – Number of columns of blocks.
block_type (_MatrixBlockType[Rows, Cols, Scalar] | _ScalarBlockType[Scalar]) – Type of individual blocks. For CSR matrices, this should be a scalar type. For BSR matrices, this should be a matrix type (e.g. from
warp.types.matrix()).device (Device | str | None) – Device on which to allocate the matrix arrays.
- Return type: