@@ -914,29 +914,28 @@ class Normalize:
914
914
A class which, when called, linearly normalizes data into the
915
915
``[0.0, 1.0]`` interval.
916
916
"""
917
+
917
918
def __init__ (self , vmin = None , vmax = None , clip = False ):
918
919
"""
919
920
Parameters
920
921
----------
921
- vmin : float
922
- vmax : float
923
- clip : bool
922
+ vmin, vmax : float or None
923
+ If *vmin* and/or *vmax* is not given, they are initialized from the
924
+ minimum and maximum value, respectively, of the first input
925
+ processed; i.e., ``__call__(A)`` calls ``autoscale_None(A)``.
926
+
927
+ clip : bool, default: False
924
928
If ``True`` values falling outside the range ``[vmin, vmax]``,
925
929
are mapped to 0 or 1, whichever is closer, and masked values are
926
- set to 1. If ``False`` masked values remain masked.
930
+ set to 1. If ``False`` masked values remain masked.
931
+
932
+ Clipping silently defeats the purpose of setting the over, under,
933
+ and masked colors in a colormap, so it is likely to lead to
934
+ surprises; therefore the default is ``clip=False``.
927
935
928
936
Notes
929
937
-----
930
- If neither *vmin* or *vmax* are given, they are initialized from the
931
- minimum and maximum value respectively of the first input
932
- processed. That is, ``__call__(A)`` calls ``autoscale_None(A)``.
933
- Returns 0 if::
934
-
935
- vmin==vmax
936
-
937
- Clipping silently defeats the purpose of setting the over, under, and
938
- masked colors in a colormap, so it is likely to lead to surprises;
939
- therefore the default is ``clip=False``.
938
+ Returns 0 if ``vmin == vmax``.
940
939
"""
941
940
self .vmin = _sanitize_extrema (vmin )
942
941
self .vmax = _sanitize_extrema (vmax )
@@ -954,7 +953,7 @@ def process_value(value):
954
953
result : masked array
955
954
Masked array with the same shape as *value*.
956
955
is_scalar : bool
957
- ``True`` if *value* is a scalar.
956
+ Whether *value* is a scalar.
958
957
959
958
Notes
960
959
-----
0 commit comments