linop.Gradient#
- bartorch.linop.Gradient()#
Forward finite differences along
axes, BART’slinop_grad.The boundary is circular: at the last index along an axis the difference is the first entry minus the last. Constants are the null space.
- Parameters:
shape (tuple of int) – Domain, C order.
axes (int or tuple of int) – Axes to difference along, each at most once.
- Returns:
Codomain
(len(axes), *shape). The components are in ascending axis order, whatever the order ofaxes.- Return type:
- Raises:
ValueError – When an axis is named twice, or the new axis would exceed BART’s dimension count.