linop.Matrix#
- class bartorch.linop.Matrix#
Bases:
LinearOperatorMultiplication by a matrix along one axis, BART’s
linop_matrix.The contracted axis has size one in the codomain and the produced axis size one in the domain. The matrix is broadcast over its axes of size one and may vary along the others, for instance one matrix per slice.
- Parameters:
matrix (tensor) – Same rank as the operator: the domain’s size along the contracted axis, the codomain’s along the produced axis.
oshape (tuple of int) – Codomain and domain, C order, with the same rank.
ishape (tuple of int) – Codomain and domain, C order, with the same rank.
Examples
A basis
(k, t)applied to(1, t, y, x), giving(k, 1, y, x):>>> B = Matrix(basis[:, :, None, None], (k, 1, y, x), (1, t, y, x))
Also has the methods and properties of LinearOperator.