8000 DOC comment on obscure syntax · scikit-learn/scikit-learn@a24b932 · GitHub
[go: up one dir, main page]

Skip to content

Commit a24b932

Browse files
committed
DOC comment on obscure syntax
1 parent 8f0d4fc commit a24b932

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/bicluster/bicluster_newsgroups.py

+2
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ def bicluster_ncut(i):
132132
return sys.float_info.max
133133
row_complement = np.nonzero(np.logical_not(cocluster.rows_[i]))[0]
134134
col_complement = np.nonzero(np.logical_not(cocluster.columns_[i]))[0]
135+
# Note: the following is identical to X[rows[:, np.newaxis], cols].sum() but
136+
# much faster in scipy <= 0.16
135137
weight = X[rows][:, cols].sum()
136138
cut = (X[row_complement][:, cols].sum() +
137139
X[rows][:, col_complement].sum())

0 commit comments

Comments
 (0)
0