diff options
author | Oleksii Kachaiev <kachayev@gmail.com> | 2023-05-08 14:42:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-08 14:42:43 +0200 |
commit | 03341c6953c06608ba17d6bf7cd35666bc069988 (patch) | |
tree | fcb4fb8c3d4395d616e1b132306dfea42d5171ed /ot/bregman.py | |
parent | f66299880f30240c55ffaa4ad5f85829f3b5b360 (diff) |
[MRG] Fix barycenter_stabilized with PyTorch and log set to True (#474)
* np -> nx for stabilized barycenters log
* Mention fix in RELEASES
Diffstat (limited to 'ot/bregman.py')
-rw-r--r-- | ot/bregman.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ot/bregman.py b/ot/bregman.py index 4503ffc..29bcd58 100644 --- a/ot/bregman.py +++ b/ot/bregman.py @@ -1898,8 +1898,8 @@ def barycenter_stabilized(A, M, reg, tau=1e10, weights=None, numItermax=1000, "Or a larger absorption threshold `tau`.") if log: log['niter'] = ii - log['logu'] = np.log(u + 1e-16) - log['logv'] = np.log(v + 1e-16) + log['logu'] = nx.log(u + 1e-16) + log['logv'] = nx.log(v + 1e-16) return q, log else: return q |