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

Apparent bug converting to real #416

Open
mmcleod89 opened this issue Jul 17, 2023 · 0 comments
Open

Apparent bug converting to real #416

mmcleod89 opened this issue Jul 17, 2023 · 0 comments

Comments

@mmcleod89
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant