-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Hi drelyea,
Thanks for maintaining this library. I’m using it for compressed sensing reconstruction in Scanning Tunneling Microscopy and it’s been very useful.
While skimming the source, I noticed what looks like a bug in the function spgl1 in the active-set stagnation counter. The code currently doubles nnz_niters instead of incrementing it:
if nnz_diff:
nnz_niters = 0
else:
nnz_niters += nnz_niters
if nnz_niters + 1 >= active_set_niters:
stat = EXIT_ACTIVE_SET
Since nnz_niters is initialized to 0, this update keeps it at 0 indefinitely (so EXIT_ACTIVE_SET would never trigger). I think the intended behavior is likely:
nnz_niters += 1
Is the doubling intentional or would you accept a fix/PR?
With kind regards,
G.N
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels