Skip to content

Commit

Permalink
[pydlr] enforce min(eps) = 10 * float_eps
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoStrand committed Feb 22, 2024
1 parent 42f2ef9 commit 6a15442
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pydlr/pydlr.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ def __init__(self, lamb, eps=1e-15, xi=-1,

self.xi = xi
self.lamb = lamb
self.eps = eps

eps = np.abs(eps)
min_eps = 10 * np.finfo(float).resolution

self.eps = eps if eps > min_eps else min_eps

opts = dict(eps=eps, xi=xi, max_rank=max_rank, nmax=nmax, verbose=verbose)

Expand Down

0 comments on commit 6a15442

Please sign in to comment.