Skip to content

Commit

Permalink
be concise
Browse files Browse the repository at this point in the history
  • Loading branch information
ogrisel committed Aug 27, 2011
1 parent 302b8b8 commit daceeec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scikits/learn/cluster/power_iteration.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def power_iteration_clustering(affinity, k=8, n_vectors=1, tol=1e-5,
for i in xrange(n_samples):
indices_i = a.indices[a.indptr[i]: a.indptr[i + 1]]
data_i = a.data[a.indptr[i]: a.indptr[i + 1]]
data_i[:] = np.where(indices_i == i, 0.0, data_i)
data_i[indices_i == i] = 0.0
else:
affinity[np.eye(n_samples, dtype=np.bool)] = 0.0
if verbose:
Expand Down

0 comments on commit daceeec

Please sign in to comment.