warp.optim.linear.aslinearoperator#
- warp.optim.linear.aslinearoperator(A, batch_offsets=None, max_batch_length=None)[source]#
Cast the dense or sparse matrix
Aas aLinearOperator.Amust be of one of the following types:two-dimensional
warp.array; thenAis assumed to be a dense matrixone-dimensional
warp.array; thenAis assumed to be a diagonal matrixwarp.optim.linear.LinearOperator; no casting necessary,batch_offsetsandmax_batch_lengthare ignored
- Parameters:
A (array | BsrMatrix | LinearOperator) – The matrix to wrap.
batch_offsets (array | None) – Optional array of shape
(B+1,)partitioning scalar degrees of freedom intoBindependent subproblems (seeLinearOperator).max_batch_length (int | None) – Optional upper bound on the number of scalar degrees of freedom in any subproblem. Requires
batch_offsets(seeLinearOperator).
- Return type: