[MRG] DOC Fix Documentation in develop.rst
diff --git a/doc/developers/develop.rst b/doc/developers/develop.rst
index 186040b32ebd8..53dd0ca47824d 100644
--- a/doc/developers/develop.rst
+++ b/doc/developers/develop.rst
@@ -696,6 +696,7 @@ The following example should make this clear::
 
         def __init__(self, n_components=100, random_state=None):
             self.random_state = random_state
+            self.n_components = n_components
 
         # the arguments are ignored anyway, so we make them optional
         def fit(self, X=None, y=None):
@@ -703,7 +704,7 @@ The following example should make this clear::
 
         def transform(self, X):
             n_samples = X.shape[0]
-            return self.random_state_.randn(n_samples, n_components)
+            return self.random_state_.randn(n_samples, self.n_components)
 
 The reason for this setup is reproducibility:
 when an estimator is ``fit`` twice to the same data,

The example at the bottom of the develop page does crash when executing it. A parameter is passed to the constructor, but never added to the object, yet referenced in one of it's methods. I simply added the parameter to the object and updated it's reference.


--------
This is my first contribution, heard on the Banana Data Podcast that even small PR's are welcome and it's best to start with documentation. So here you go :smile: