bartorch.linop.stack

Contents

bartorch.linop.stack#

bartorch.linop.stack(ops, axis=0)#

Apply every operator to the same input and put the results on a new axis.

torch.stack of what they return: unlike concatenate() the codomains must agree everywhere, and the result gains an axis of length len(ops).

Parameters:
  • ops (sequence of LinearOperator) – At least one. All must have the same domain and the same codomain.

  • axis (int) – Where the new axis goes in the result.

Examples

>>> A = stack([FFT(shape, axes=-1), Identity(shape)])
>>> A.oshape == (2,) + shape
True