linop.Diagonal#
- class bartorch.linop.Diagonal#
Bases:
LinearOperatorPointwise multiplication by
diag, broadcast over the axes where it is one.BART’s
cdiag.- Parameters:
diag (tensor) – The diagonal. Every axis is either the operator’s size along that axis or one, and the ones are broadcast.
shape (tuple of int) – The shape the operator works on, C order.
- set()#
Replace the values, in place, keeping the operator’s identity.
valueshas the shape the operator was built with. A solve or a step assembled over this operator is unaffected structurally and needs no rebuild; only what it computes changes.
Also has the methods and properties of LinearOperator.