8000 DOC Fix documentation of default values in _pilutil.py by bmaisonn · Pull Request #17990 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

DOC Fix documentation of default values in _pilutil.py #17990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions sklearn/externals/_pilutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ def bytescale(data, cmin=None, cmax=None, high=255, low=0):
----------
data : ndarray
PIL image data array.
cmin : scalar, optional
cmin : scalar, default=None
Bias scaling of small values. Default is ``data.min()``.
cmax : scalar, optional
cmax : scalar, default=None
Bias scaling of large values. Default is ``data.max()``.
high : scalar, optional
high : scalar, default=None
Scale max value to `high`. Default is 255.
low : scalar, optional
low : scalar, default=None
Scale min value to `low`. Default is 0.

Returns
Expand Down Expand Up @@ -158,9 +158,9 @@ def imread(name, flatten=False, mode=None):
----------
name : str or file object
The file name or file object to be read.
flatten : bool, optional
flatten : bool, default=False
If True, flattens the color layers into a single gray-scale layer.
mode : str, optional
mode : str, default=None
Mode to convert image to, e.g. ``'RGB'``. See the Notes for more
details.

Expand Down Expand Up @@ -229,7 +229,7 @@ def imsave(name, arr, format=None):
represents a grey-level image. Shape ``MxNx3`` stores the red, green
and blue bands along the last dimension. An alpha layer may be
included, specified as the last colour band of an ``MxNx4`` array.
format : str
format : str, default=None
Image format. If omitted, the format to use is determined from the
file name extension. If a file object was used instead of a file name,
this parameter should always be used.
Expand Down Expand Up @@ -272,9 +272,9 @@ def fromimage(im, flatten=False, mode=None):
----------
im : PIL image
Input image.
flatten : bool
flatten : bool, default=False
If true, convert the output to grey-scale.
mode : str, optional
mode : str, default=None
Mode to convert image to, e.g. ``'RGB'``. See the Notes of the
`imread` docstring for more details.

Expand Down Expand Up @@ -470,10 +470,10 @@ def imresize(arr, size, interp='bilinear', mode=None):
* float - Fraction of current size.
* tuple - Size of the output image (height, width).

interp : str, optional
interp : str, default='bilinear'
Interpolation to use for re-sizing ('nearest', 'lanczos', 'bilinear',
'bicubic' or 'cubic').
mode : str, optional
mode : str, default=None
The PIL image mode ('P', 'L', etc.) to convert `arr` before resizing.
If ``mode=None`` (the default), 2-D images will be treated like
``mode='L'``, i.e. casting to long integer. For 3-D and 4-D arrays,
Expand Down
0