@@ -3352,7 +3352,7 @@ def n_components(self):
3352
3352
3353
3353
@property
3354
3354
def norms (self ):
3355
- """The individual norms held by this `MultiNorm`"""
3355
+ """The individual norms held by this `MultiNorm`. """
3356
3356
return self ._norms
3357
3357
3358
3358
@property
@@ -3361,10 +3361,10 @@ def vmin(self):
3361
3361
return tuple (n .vmin for n in self ._norms )
3362
3362
3363
3363
@vmin .setter
3364
- def vmin (self , value ):
3365
- value = np .broadcast_to (value , self .n_components )
3364
+ def vmin (self , values ):
3365
+ values = np .broadcast_to (values , self .n_components )
3366
3366
with self .callbacks .blocked ():
3367
- for norm , v in zip (self .norms , value ):
3367
+ for norm , v in zip (self .norms , values ):
3368
3368
if v is not None :
3369
3369
norm .vmin = v
3370
3370
self ._changed ()
@@ -3375,10 +3375,10 @@ def vmax(self):
3375
3375
return tuple (n .vmax for n in self ._norms )
3376
3376
3377
3377
@vmax .setter
3378
- def vmax (self , value ):
3379
- value = np .broadcast_to (value , self .n_components )
3378
+ def vmax (self , values ):
3379
+ value = np .broadcast_to (values , self .n_components )
3380
3380
with self .callbacks .blocked ():
3381
- for norm , v in zip (self .norms , value ):
3381
+ for norm , v in zip (self .norms , values ):
3382
3382
if v is not None :
3383
3383
norm .vmax = v
3384
3384
self ._changed ()
@@ -3389,10 +3389,10 @@ def clip(self):
3389
3389
return tuple (n .clip for n in self ._norms )
3390
3390
3391
3391
@clip .setter
3392
- def clip (self , value ):
3393
- value = np .broadcast_to (value , self .n_components )
3392
+ def clip (self , values ):
3393
+ values = np .broadcast_to (values , self .n_components )
3394
3394
with self .callbacks .blocked ():
3395
- for norm , v in zip (self .norms , value ):
3395
+ for norm , v in zip (self .norms , values ):
3396
3396
if v is not None :
3397
3397
norm .clip = v
3398
3398
self ._changed ()
@@ -3404,15 +3404,15 @@ def _changed(self):
3404
3404
"""
3405
3405
self .callbacks .process ('changed' )
3406
3406
3407
- def __call__ (self , value , clip = None , structured_output = None ):
3407
+ def __call__ (self , values , clip = None , structured_output = None ):
3408
3408
"""
3409
3409
Normalize the data and return the normalized data.
3410
3410
3411
- Each component of the input is assigned to the constituent norm.
3411
+ Each component of the input is normalized via the constituent norm.
3412
3412
3413
3413
Parameters
3414
3414
----------
3415
- value : array-like
3415
+ values : array-like
3416
3416
Data to normalize, as tuple, scalar array or structured array.
3417
3417
3418
3418
- If tuple, must be of length `n_components`
@@ -3439,44 +3439,44 @@ def __call__(self, value, clip=None, structured_output=None):
3439
3439
Notes
3440
3440
-----
3441
3441
If not already initialized, ``self.vmin`` and ``self.vmax`` are
3442
- initialized using ``self.autoscale_None(value )``.
3442
+ initialized using ``self.autoscale_None(values )``.
3443
3443
"""
3444
3444
if clip is None :
3445
3445
clip = self .clip
3446
3446
elif not np .iterable (clip ):
3447
3447
clip = [clip ]* self .n_components
3448
3448
3449
3449
if structured_output is None :
3450
- if isinstance (value , np .ndarray ) and value .dtype .fields is not None :
3450
+ if isinstance (values , np .ndarray ) and values .dtype .fields is not None :
3451
3451
structured_output = True
3452
3452
else :
3453
3453
structured_output = False
3454
3454
3455
- value = self ._iterable_components_in_data (value , self .n_components )
3455
+ values = self ._iterable_components_in_data (values , self .n_components )
3456
3456
3457
- result = tuple (n (v , clip = c ) for n , v , c in zip (self .norms , value , clip ))
3457
+ result = tuple (n (v , clip = c ) for n , v , c in zip (self .norms , values , clip ))
3458
3458
3459
3459
if structured_output :
3460
3460
result = self ._ensure_multicomponent_data (result , self .n_components )
3461
3461
3462
3462
return result
3463
3463
3464
- def inverse (self , value ):
3464
+ def inverse (self , values ):
3465
3465
"""
3466
- Map the normalized value (i.e., index in the colormap) back to image data value .
3466
+ Map the normalized values (i.e., index in the colormap) back to data values .
3467
3467
3468
3468
Parameters
3469
3469
----------
3470
- value
3471
- Normalized value , as tuple, scalar array or structured array.
3470
+ values
3471
+ Normalized values , as tuple, scalar array or structured array.
3472
3472
3473
3473
- If tuple, must be of length `n_components`
3474
3474
- If scalar array, the first axis must be of length `n_components`
3475
3475
- If structured array, must have `n_components` fields.
3476
3476
3477
3477
"""
3478
- value = self ._iterable_components_in_data (value , self .n_components )
3479
- result = [n .inverse (v ) for n , v in zip (self .norms , value )]
3478
+ values = self ._iterable_components_in_data (values , self .n_components )
3479
+ result = [n .inverse (v ) for n , v in zip (self .norms , values )]
3480
3480
return result
3481
3481
3482
3482
def autoscale (self , A ):
@@ -3487,8 +3487,8 @@ def autoscale(self, A):
3487
3487
Parameters
3488
3488
----------
3489
3489
A
3490
- Data, must be of length `n_components` or be a structured array or scalar
3491
- with `n_components` fields.
3490
+ Data, must be of length `n_components` or be a structured scalar or
3491
+ structured array with `n_components` fields.
3492
3492
"""
3493
3493
with self .callbacks .blocked ():
3494
3494
# Pause callbacks while we are updating so we only get
@@ -3561,7 +3561,7 @@ def _ensure_multicomponent_data(data, n_components):
3561
3561
Parameters
3562
3562
----------
3563
3563
n_components : int
3564
- - number of omponents in the data
3564
+ Number of omponents in the data.
3565
3565
data : np.ndarray, PIL.Image or None
3566
3566
3567
3567
Returns
0 commit comments