Skip to content

Commit 744a5bd

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 88666f0 commit 744a5bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

machine_learning/tsne.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def compute_pairwise_affinities(x: np.ndarray, sigma: float = 1.0) -> np.ndarray
6666
n_samples = x.shape[0]
6767
sum_x = np.sum(np.square(x), axis=1)
6868
d = np.add(np.add(-2 * np.dot(x, x.T), sum_x).T, sum_x)
69-
p = np.exp(-d / (2 * sigma ** 2))
69+
p = np.exp(-d / (2 * sigma**2))
7070
np.fill_diagonal(p, 0)
7171
p /= np.sum(p)
7272
return (p + p.T) / (2 * n_samples)

0 commit comments

Comments
 (0)