Skip to content

Commit a80f78a

Browse files
committed
Remove squaring of weights in normalOperator of DiagOp
1 parent 8b9451a commit a80f78a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DiagOp.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ function LinearOperatorCollection.normalOperator(diag::DiagOp, W=opEye(eltype(di
148148

149149
# we promote the weights to be of the same type as T, which will be required
150150
# when creating the temporary vector in normalOperator in a later stage
151-
opInner = normalOperator(diag.ops[1], WeightingOp(T; weights=T.(weights[diag.yIdx[1]:diag.yIdx[2]-1].^2)); copyOpsFn = copyOpsFn, kwargs...)
151+
opInner = normalOperator(diag.ops[1], WeightingOp(T; weights=T.(weights[diag.yIdx[1]:diag.yIdx[2]-1])); copyOpsFn = copyOpsFn, kwargs...)
152152
op = DiagNormalOp([copyOpsFn(opInner) for i=1:length(diag.ops)], size(diag,2), diag.xIdx, S(undef, diag.ncol) )
153153
else
154-
op = DiagNormalOp([normalOperator(diag.ops[i], WeightingOp(T; weights=T.(weights[diag.yIdx[i]:diag.yIdx[i+1]-1].^2)); copyOpsFn = copyOpsFn, kwargs...)
154+
op = DiagNormalOp([normalOperator(diag.ops[i], WeightingOp(T; weights=T.(weights[diag.yIdx[i]:diag.yIdx[i+1]-1])); copyOpsFn = copyOpsFn, kwargs...)
155155
for i in 1:length(diag.ops)], size(diag,2), diag.xIdx, S(undef, diag.ncol) )
156156
end
157157

0 commit comments

Comments
 (0)