You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Documentation error in doc/developers/contributing.rst #13097
I think there is an error in the example of the class ExampleEstimator in line 879.
In the fit method it says k instead of self.k. If that's the case, I can fix it.
Steps/Code to Reproduce
Doesn't apply.
Expected Results
class ExampleEstimator(BaseEstimator):
def __init__(self, n_clusters=8, k='not_used'):
self.n_clusters = n_clusters
self.k = k
def fit(self, X, y):
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 = self.k
else:
self._n_clusters = self.n_clusters
Actual Results
class ExampleEstimator(BaseEstimator):
def __init__(self, n_clusters=8, k='not_used'):
self.n_clusters = n_clusters
self.k = k
def fit(self, X, y):
if 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
else:
self._n_clusters = self.n_clusters
I answered from my mailbox, so I thought I had answered the other issue. My bad. Effectively # 13096 is my first PR.
When I read about the steps to document the code I found myself in the documentation of version 0.16 with the use of pyflakes, coverage and pep8, which was very helpful before doing the PR. In the stable version I think you removed it. If in future versions you plan to add it again, just remind that pep8 is going to be changed by pycodestyle.
Activity
[-]Documentation error in `contributing.rst`[/-][+]Documentation error in doc/developers/contributing.rst[/+]jnothman commentedon Feb 6, 2019
fferrin commentedon Feb 6, 2019
jnothman commentedon Feb 6, 2019
I think #13096 is your first PR, but a separate one addressing the contributor docs issue would be welcome!!
bharatr21 commentedon Feb 6, 2019
@fferrin May I work on this issue, if you're not working on it already?
fferrin commentedon Feb 6, 2019
I answered from my mailbox, so I thought I had answered the other issue. My bad. Effectively # 13096 is my first PR.
When I read about the steps to document the code I found myself in the documentation of version 0.16 with the use of
pyflakes,coverageandpep8, which was very helpful before doing the PR. In the stable version I think you removed it. If in future versions you plan to add it again, just remind thatpep8is going to be changed bypycodestyle.