Skip to content

Commit 7d57dad

Browse files
authored
Merge pull request #4 from JuliaImageRecon/Fix-adjoint-gradient-bug
Circumvent a bug in LinearOperators
2 parents 0f6ba62 + 15f59c3 commit 7d57dad

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/GradientOp.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ function GradientOpImpl(T::Type, shape::NTuple{N,Int64}, dim::Integer) where N
3030
nrow = div( (shape[dim]-1)*prod(shape), shape[dim] )
3131
ncol = prod(shape)
3232
return LinearOperator{T}(nrow, ncol, false, false,
33-
(res,x) -> (grad!(res,x,shape,dim) ),
34-
(res,x) -> (grad_t!(res,x,shape,dim) ),
35-
nothing )
33+
(res,x) -> (grad!(res,x,shape,dim)),
34+
(res,x) -> (grad_t!(res,x,shape,dim)),
35+
(res,x) -> (grad_t!(res,x,shape,dim))
36+
)
3637
end
3738

3839
# directional gradients

0 commit comments

Comments
 (0)