Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor bug in scico.functional.TVNorm #548

Merged
merged 2 commits into from
Aug 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions scico/functional/_tvnorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,15 @@ def _prox_operators(
# Replicate-pad to the right (resulting in a zero after finite differencing)
# on all axes subject to finite differencing.
pad_width = [(0, 1) if i in axes else (0, 0) for i, s in enumerate(input_shape)] # type: ignore
P = Pad(input_shape, pad_width=pad_width, mode="edge", jit=True)
P = Pad(
input_shape, input_dtype=input_dtype, pad_width=pad_width, mode="edge", jit=True
)
# fused boundary extend and forward transform linop
WP = W @ P
# crop operation that is inverse of the padding operation
C = Crop(crop_width=pad_width, input_shape=w_input_shape, jit=True)
C = Crop(
crop_width=pad_width, input_shape=w_input_shape, input_dtype=input_dtype, jit=True
)
# fused adjoint transform and crop linop
CWT = C @ W.T
return WP, CWT, ndims, slce
Expand Down
Loading