warp.optim.linear.aslinearoperator#

warp.optim.linear.aslinearoperator(A, batch_offsets=None, max_batch_length=None)[source]#

Cast the dense or sparse matrix A as a LinearOperator.

A must be of one of the following types:

Parameters:
  • A (array | BsrMatrix | LinearOperator) – The matrix to wrap.

  • batch_offsets (array | None) – Optional array of shape (B+1,) partitioning scalar degrees of freedom into B independent subproblems (see LinearOperator).

  • max_batch_length (int | None) – Optional upper bound on the number of scalar degrees of freedom in any subproblem. Requires batch_offsets (see LinearOperator).

Return type:

LinearOperator