8000 MAINT consistent use of `print(__doc__)` in examples (#21307) · samronsin/scikit-learn@763954c · GitHub
[go: up one dir, main page]

Skip to content

Commit 763954c

Browse files
DimitriPapadopoulosglemaitre
authored andcommitted
MAINT consistent use of print(__doc__) in examples (scikit-learn#21307)
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
1 parent 66fce68 commit 763954c

File tree

271 files changed

+247
-355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+247
-355
lines changed

examples/applications/plot_cyclical_feature_engineering.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
`extrapolation="periodic"` option.
1313
1414
"""
15+
1516
# %%
1617
# Data exploration on the Bike Sharing Demand dataset
1718
# ---------------------------------------------------

examples/applications/plot_digits_denoising.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
"Learning to find pre-images."
1919
Advances in neural information processing systems 16 (2004): 449-456.
2020
<https://papers.nips.cc/paper/2003/file/ac1ad983e08ad3304a97e147f522747e-Paper.pdf>`_
21-
"""
2221
23-
print(__doc__)
22+
"""
2423

2524
# Authors: Guillaume Lemaitre <guillaume.lemaitre@inria.fr>
2625
# Licence: BSD 3 clause

examples/applications/plot_face_recognition.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
================== ============ ======= ========== =======
2828
2929
"""
30+
3031
from time import time
3132
import logging
3233
import matplotlib.pyplot as plt
@@ -40,8 +41,6 @@
4041
from sklearn.svm import SVC
4142

4243

43-
print(__doc__)
44-
4544
# Display progress logs on stdout
4645
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(message)s")
4746

examples/applications/plot_model_complexity_influence.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
3333
"""
3434

35-
print(__doc__)
36-
3735
# Authors: Eustache Diemert <eustache@diemert.fr>
3836
# Maria Telenczuk <https://github.com/maikia>
3937
# Guillaume Lemaitre <g.lemaitre58@gmail.com>

examples/applications/plot_out_of_core_classification.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
HashingVectorizer that will project each example into the same feature space.
1212
This is especially useful in the case of text classification where new
1313
features (words) may appear in each batch.
14+
1415
"""
1516

1617
# Authors: Eustache Diemert <eustache@diemert.fr>

examples/applications/plot_outlier_detection_wine.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
example, none of these could be applied that easily.
3434
3535
"""
36-
print(__doc__)
3736

3837
# Author: Virgile Fritsch <virgile.fritsch@inria.fr>
3938
# License: BSD 3 clause

examples/applications/plot_species_distribution_modeling.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<http://rob.schapire.net/papers/ecolmod.pdf>`_
3434
S. J. Phillips, R. P. Anderson, R. E. Schapire - Ecological Modelling,
3535
190:231-259, 2006.
36+
3637
"""
3738

3839
# Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com>
@@ -58,8 +59,6 @@
5859
except ImportError:
5960
basemap = False
6061

61-
print(__doc__)
62-
6362

6463
def construct_grids(batch):
6564
"""Construct the map grid from the batch object

examples/applications/plot_stock_market.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
is to position the labels minimizing overlap. For this we use an
5959
heuristic based on the direction of the nearest neighbor along each
6060
axis.
61+
6162
"""
6263

6364
# Author: Gael Varoquaux gael.varoquaux@normalesup.org
@@ -73,8 +74,6 @@
7374

7475
from sklearn import cluster, covariance, manifold
7576

76-
print(__doc__)
77-
7877

7978
# #############################################################################
8079
# Retrieve the data from Internet

examples/applications/plot_tomography_l1_reconstruction.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ class :class:`~sklearn.linear_model.Lasso`, that uses the coordinate descent
3333
reconstructed image, contrary to the L1 penalization. Note in particular
3434
the circular artifact separating the pixels in the corners, that have
3535
contributed to fewer projections than the central disk.
36-
"""
3736
38-
print(__doc__)
37+
"""
3938

4039
# Author: Emmanuelle Gouillart <emmanuelle.gouillart@nsup.org>
4140
# License: BSD 3 clause

examples/applications/svm_gui.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
1515
"""
1616

17-
print(__doc__)
18-
1917
# Author: Peter Prettenhoer <peter.prettenhofer@gmail.com>
2018
#
2119
# License: BSD 3 clause

0 commit comments

Comments
 (0)
0