diff --git a/doc/modules/manifold.rst b/doc/modules/manifold.rst index e6e8e842fa7fc..54e052dd2d614 100644 --- a/doc/modules/manifold.rst +++ b/doc/modules/manifold.rst @@ -417,7 +417,7 @@ version, the algorithms will try to preserve the order of the distances, and hence seek for a monotonic relationship between the distances in the embedded space and the similarities/dissimilarities. -.. figure:: ../auto_examples/manifold/images/sphx_glr_plot_lle_digits_010.png +.. figure:: ../auto_examples/manifold/images/sphx_glr_plot_lle_digits_002.png :target: ../auto_examples/manifold/plot_lle_digits.html :align: center :scale: 50 diff --git a/sklearn/pipeline.py b/sklearn/pipeline.py index 794919f6942e1..29409e37df3e8 100644 --- a/sklearn/pipeline.py +++ b/sklearn/pipeline.py @@ -201,15 +201,12 @@ def _validate_steps(self): for t in transformers: if t is None or t == "passthrough": continue - if not (hasattr(t, "fit") or hasattr(t, "fit_transform")) or not hasattr( - t, "transform" - ): - raise TypeError( - "All intermediate steps should be " - "transformers and implement fit and transform " - "or be the string 'passthrough' " - "'%s' (type %s) doesn't" % (t, type(t)) - ) + if (not (hasattr(t, "fit") or hasattr(t, "fit_transform")) or not + hasattr(t, "transform")): + raise TypeError("All intermediate steps should be " + "transformers and implement fit and transform " + "or be the string 'passthrough' " + "'%s' (type %s) doesn't" % (t, type(t))) # We allow last estimator to be None as an identity transformation if ( @@ -220,8 +217,7 @@ def _validate_steps(self): raise TypeError( "Last step of Pipeline should implement fit " "or be the string 'passthrough'. " - "'%s' (type %s) doesn't" % (estimator, type(estimator)) - ) + "'%s' (type %s) doesn't" % (estimator, type(estimator))) def _iter(self, with_final=True, filter_passthrough=True): """