8000 BUG: fix replacement for _neg. · nullnotfound/scikit-learn@8a473b6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8a473b6

Browse files
committed
BUG: fix replacement for _neg.
1 parent d3bc5ac commit 8a473b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/decomposition/nmf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _initialize_nmf(X, n_components, variant=None, eps=1e-6,
116116

117117
# extract positive and negative parts of column vectors
118118
x_p, y_p = np.maximum(x, 0), np.maximum(y, 0)
119-
x_n, y_n = np.minimum(x, 0), np.minimum(y, 0)
119+
x_n, y_n = np.abs(np.minimum(x, 0)), np.abs(np.minimum(y, 0))
120120

121121
# and their norms
122122
x_p_nrm, y_p_nrm = norm(x_p), norm(y_p)

0 commit comments

Comments
 (0)
0