@@ -851,10 +851,12 @@ class Normalize(object):
851
851
"""
852
852
def __init__ (self , vmin = None , vmax = None , clip = False ):
853
853
"""
854
- If *vmin* or *vmax* is not given, they are taken from the input's
855
- minimum and maximum value respectively. If *clip* is *True* and
856
- the given value falls outside the range, the returned value
857
- will be 0 or 1, whichever is closer. Returns 0 if::
854
+ If *vmin* or *vmax* is not given, they are initialized from the
855
+ minimum and maximum value respectively of the first input
856
+ processed. That is, *__call__(A)* calls *autoscale_None(A)*.
857
+ If *clip* is *True* and the given value falls outside the range,
858
+ the returned value will be 0 or 1, whichever is closer.
859
+ Returns 0 if::
858
860
859
861
vmin==vmax
860
862
@@ -902,6 +904,13 @@ def process_value(value):
902
904
return result , is_scalar
903
905
904
906
def __call__ (self , value , clip = None ):
907
+ """
908
+ Normalize *value* data in the ``[vmin, vmax]`` interval into
909
+ the ``[0.0, 1.0]`` interval and return it. *clip* defaults
910
+ to *self.clip* (which defaults to *False*). If not already
911
+ initialized, *vmin* and *vmax* are initialized using
912
+ *autoscale_None(value)*.
913
+ """
905
914
if clip is None :
906
915
clip = self .clip
907
916
0 commit comments