10000 cleanup optional keywords in the documentation (#17990) · scikit-learn/scikit-learn@d010291 · GitHub
[go: up one dir, main page]

Skip to content

Commit d010291

Browse files
authored
cleanup optional keywords in the documentation (#17990)
1 parent a91d09b commit d010291

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

sklearn/externals/_pilutil.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ def bytescale(data, cmin=None, cmax=None, high=255, low=0):
8787
----------
8888
data : ndarray
8989
PIL image data array.
90-
cmin : scalar, optional
90+
cmin : scalar, default=None
9191
Bias scaling of small values. Default is ``data.min()``.
92-
cmax : scalar, optional
92+
cmax : scalar, default=None
9393
Bias scaling of large values. Default is ``data.max()``.
94-
high : scalar, optional
94+
high : scalar, default=None
9595
Scale max value to `high`. Default is 255.
96-
low : scalar, optional
96+
low : scalar, default=None
9797
Scale min value to `low`. Default is 0.
9898
9999
Returns
@@ -158,9 +158,9 @@ def imread(name, flatten=False, mode=None):
158158
----------
159159
name : str or file object
160160
The file name or file object to be read.
161-
flatten : bool, optional
161+
flatten : bool, default=False
162162
If True, flattens the color layers into a single gray-scale layer.
163-
mode : str, optional
163+
mode : str, default=None
164164
Mode to convert image to, e.g. ``'RGB'``. See the Notes for more
165165
details.
166166
@@ -229,7 +229,7 @@ def imsave(name, arr, format=None):
229229
represents a grey-level image. Shape ``MxNx3`` stores the red, green
230230
and blue bands along the last dimension. An alpha layer may be
231231
included, specified as the last colour band of an ``MxNx4`` array.
232-
format : str
232+
format : str, default=None
233233
Image format. If omitted, the format to use is determined from the
234234
file name extension. If a file object was used instead of a file name,
235235
this parameter should always be used.
@@ -272,9 +272,9 @@ def fromimage(im, flatten=False, mode=None):
272272
----------
273273
im : PIL image
274274
Input image.
275-
flatten : bool
275+
flatten : bool, default=False
276276
If true, convert the output to grey-scale.
277-
mode : str, optional
277+
mode : str, default=None
278278
Mode to convert image to, e.g. ``'RGB'``. See the Notes of the
279279
`imread` docstring for more details.
280280
@@ -470,10 +470,10 @@ def imresize(arr, size, interp='bilinear', mode=None):
470470
* float - Fraction of current size.
471471
* tuple - Size of the output image (height, width).
472472
473-
interp : str, optional
473+
interp : str, default='bilinear'
474474
Interpolation to use for re-sizing ('nearest', 'lanczos', 'bilinear',
475475
'bicubic' or 'cubic').
476-
mode : str, optional
476+
mode : str, default=None
477477
The PIL image mode ('P', 'L', etc.) to convert `arr` before resizing.
478478
If ``mode=None`` (the default), 2-D images will be treated like
479479
``mode='L'``, i.e. casting to long integer. For 3-D and 4-D arrays,

0 commit comments

Comments
 (0)
0