mrpro.utils.broadcast_right
- mrpro.utils.broadcast_right(*x: Tensor) tuple[Tensor, ...] [source]
Broadcasting on the right.
Given multiple tensors, apply broadcasting with unsqueezed on the right. First, tensors are unsqueezed on the right to the same number of dimensions. Then, torch.broadcasting is used.
Example
tensors with shapes (1,2,3), (1,2), (2) results in tensors with shape (2,2,3)
- Parameters:
x – tensors to broadcast
- Return type:
broadcasted tensors (views)