Skip to content

Commit

Permalink
DOC Correct code example in doc/developers/contributing.rst (scikit-l…
Browse files Browse the repository at this point in the history
  • Loading branch information
bharatr21 authored and qinhanmin2014 committed Feb 7, 2019
1 parent 1582926 commit 1a850eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/developers/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -882,10 +882,10 @@ When the change is in a class, we validate and raise warning in ``fit``::
self.k = k

def fit(self, X, y):
if k != 'not_used':
if self.k != 'not_used':
warnings.warn("'k' was renamed to n_clusters in version 0.13 and "
"will be removed in 0.15.", DeprecationWarning)
self._n_clusters = k
self._n_clusters = self.k
else:
self._n_clusters = self.n_clusters

Expand Down

0 comments on commit 1a850eb

Please sign in to comment.