Skip to content

Commit 0764e35

Browse files
committed
Add comment & fix flake8 error
1 parent 73e6154 commit 0764e35

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ot/bregman.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ def sinkhorn_knopp(a, b, M, reg, numItermax=1000,
344344

345345
# print(reg)
346346

347+
# Next 3 lines equivalent to K= np.exp(-M/reg), but faster to compute
347348
K = np.empty(M.shape, dtype=M.dtype)
348349
np.divide(M, -reg, out=K)
349350
np.exp(K, out=K)

ot/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def clean_zeros(a, b, M):
7676
b2 = b[b > 0]
7777
return a2, b2, M2
7878

79+
7980
def euclidean_distances(X, Y, squared=False):
8081
"""
8182
Considering the rows of X (and Y=X) as vectors, compute the

0 commit comments

Comments
 (0)