linop.stack#
- bartorch.linop.stack()#
Apply every operator to the same input and stack the outputs on a new axis.
torch.stackof the outputs: the codomain gains an axis of lengthlen(ops).- Parameters:
ops (sequence of LinearOperator) – At least one, all with the same domain and codomain.
axis (int, default=0) – Position of the new axis in the codomain.
- Return type:
- Raises:
ValueError – When the shapes differ, or the new axis would exceed BART’s dimension count.
Examples
>>> A = stack([FFT(shape, axes=-1), Identity(shape)]) >>> A.oshape == (2,) + shape True