@@ -925,29 +925,28 @@ class Normalize:
925
925
A class which, when called, linearly normalizes data into the
926
926
``[0.0, 1.0]`` interval.
927
927
"""
928
+
928
929
def __init__ (self , vmin = None , vmax = None , clip = False ):
929
930
"""
930
931
Parameters
931
932
----------
932
- vmin : scalar
933
- vmax : scalar
934
- clip : bool
933
+ vmin, vmax : float or None
934
+ If *vmin* and/or *vmax* is not given, they are initialized from the
935
+ minimum and maximum value, respectively, of the first input
936
+ processed; i.e., ``__call__(A)`` calls ``autoscale_None(A)``.
937
+
938
+ clip : bool, default: False
935
939
If ``True`` values falling outside the range ``[vmin, vmax]``,
936
940
are mapped to 0 or 1, whichever is closer, and masked values are
937
- set to 1. If ``False`` masked values remain masked.
941
+ set to 1. If ``False`` masked values remain masked.
942
+
943
+ Clipping silently defeats the purpose of setting the over, under,
944
+ and masked colors in a colormap, so it is likely to lead to
945
+ surprises; therefore the default is ``clip=False``.
938
946
939
947
Notes
940
948
-----
941
- If neither *vmin* or *vmax* are given, they are initialized from the
942
- minimum and maximum value respectively of the first input
943
- processed. That is, ``__call__(A)`` calls ``autoscale_None(A)``.
944
- Returns 0 if::
945
-
946
- vmin==vmax
947
-
948
- Clipping silently defeats the purpose of setting the over, under, and
949
- masked colors in a colormap, so it is likely to lead to surprises;
950
- therefore the default is ``clip=False``.
949
+ Returns 0 if ``vmin == vmax``.
951
950
"""
952
951
self .vmin = _sanitize_extrema (vmin )
953
952
self .vmax = _sanitize_extrema (vmax )
@@ -965,7 +964,7 @@ def process_value(value):
965
964
result : masked array
966
965
Masked array with the same shape as *value*.
967
966
is_scalar : bool
968
- ``True`` if *value* is a scalar.
967
+ Whether *value* is a scalar.
969
968
970
969
Notes
971
970
-----
0 commit comments