Apparent bug converting to real
Opened this issue · 0 comments
mmcleod89 commented
Hi everyone, I think there might be an issue with this code (it appears in a few places but this particular example is from l1_g_proximal.h:
return l1_proximal_real_constraint()
? call_l1_proximal(out, gamma, x.real().template cast<typename T1::Scalar>())
: call_l1_proximal(out, gamma, x);
So this is trying to cast to type Scalar to enforce a real constraint. But isn't this class instantiated with complex in the case of the complex FB algorithm, or am I being very dumb? We instantiate SCALAR to complex in ImagingForwardBackward and this passes it on to ForwardBackward which knocks on to l1_g_proximal and l1_proximal.