@@ -3279,16 +3279,16 @@ def inverse(self, value):
3279
3279
3280
3280
class MultiNorm (Normalize ):
3281
3281
"""
3282
- Amixin class which contains multiple scalar norms
3282
+ A class which contains multiple scalar norms
3283
3283
"""
3284
3284
3285
3285
def __init__ (self ,norms ,vmin = None ,vmax = None ,clip = False ):
3286
3286
"""
3287
3287
Parameters
3288
3288
----------
3289
- norms :List of (str, `Normalize` or None)
3289
+ norms :list of (str, `Normalize` or None)
3290
3290
The constituent norms. The list must have a minimum length of 2.
3291
- vmin, vmax : float, None, or list of float or None
3291
+ vmin, vmax : float or None or list of( float or None)
3292
3292
Limits of the constituent norms.
3293
3293
If a list, each value is assigned to each of the constituent
3294
3294
norms. Single values are repeated to form a list of appropriate size.
@@ -3332,14 +3332,17 @@ def __init__(self, norms, vmin=None, vmax=None, clip=False):
3332
3332
3333
3333
@property
3334
3334
def n_variables (self ):
3335
+ """Number of norms held by this `MultiNorm`."""
3335
3336
return len (self ._norms )
3336
3337
3337
3338
@property
3338
3339
def norms (self ):
3340
+ """The individual norms held by this `MultiNorm`"""
3339
3341
return self ._norms
3340
3342
3341
3343
@property
3342
3344
def vmin (self ):
3345
+ """The lower limit of each constituent norm."""
3343
3346
return tuple (n .vmin for n in self ._norms )
3344
3347
3345
3348
@vmin .setter
@@ -3353,6 +3356,7 @@ def vmin(self, value):
3353
3356
3354
3357
@property
3355
3358
def vmax (self ):
3359
+ """The upper limit of each constituent norm."""
3356
3360
return tuple (n .vmax for n in self ._norms )
3357
3361
3358
3362
@vmax .setter
@@ -3366,6 +3370,7 @@ def vmax(self, value):
3366
3370
3367
3371
@property
3368
3372
def clip (self ):
3373
+ """The clip behaviour of each constituent norm."""
3369
3374
return tuple (n .clip for n in self ._norms )
3370
3375
3371
3376
@clip .setter
@@ -3392,17 +3397,17 @@ def __call__(self, value, clip=None):
3392
3397
3393
3398
Parameters
3394
3399
----------
3395
- value
3396
- Data to normalize. Must be of length `n_variables` orhave adata type with
3397
- `n_variables` fields.
3400
+ value : array-like
3401
+ Data to normalize. Must be of length `n_variables` orbe astructured
3402
+ array or scalar with `n_variables` fields.
3398
3403
clip : list of bools or bool, optional
3399
3404
See the description of the parameter *clip* in Normalize.
3400
3405
If ``None``, defaults to ``self.clip`` (which defaults to
3401
3406
``False``).
3402
3407
3403
3408
Returns
3404
3409
-------
3405
- List
3410
+ list
3406
3411
Normalized input values as a list of length `n_variables`
3407
3412
3408
3413
Notes
@@ -3426,8 +3431,8 @@ def inverse(self, value):
3426
3431
Parameters
3427
3432
----------
3428
3433
value
3429
- Normalized value. Must be of length `n_variables` orhave adata type with
3430
- `n_variables` fields.
3434
+ Normalized value. Must be of length `n_variables` orbe astructured array
3435
+ or scalar with `n_variables` fields.
3431
3436
"""
3432
3437
value = self ._iterable_variates_in_data (value ,self .n_variables )
3433
3438
result = [n .inverse (v )for n ,v in zip (self .norms ,value )]
@@ -3454,8 +3459,8 @@ def autoscale_None(self, A):
3454
3459
Parameters
3455
3460
----------
3456
3461
A
3457
- Data, must be of length `n_variables` orhave adata type with
3458
- `n_variables` fields.
3462
+ Data, must be of length `n_variables` orbe astructured array or scalar
3463
+ with `n_variables` fields.
3459
3464
"""
3460
3465
with self .callbacks .blocked ():
3461
3466
A = self ._iterable_variates_in_data (A ,self .n_variables )
@@ -3464,7 +3469,7 @@ def autoscale_None(self, A):
3464
3469
self ._changed ()
3465
3470
3466
3471
def scaled (self ):
3467
- """Return whether both *vmin* and *vmax* are set on all constituent norms"""
3472
+ """Return whether both *vmin* and *vmax* are set on all constituent norms. """
3468
3473
return all ([n .scaled ()for n in self .norms ])
3469
3474
3470
3475
@staticmethod
@@ -3490,8 +3495,8 @@ def _iterable_variates_in_data(data, n_variables):
3490
3495
data = [data [descriptor [0 ]]for descriptor in data .dtype .descr ]
3491
3496
if len (data )!= n_variables :
3492
3497
raise ValueError ("The input to this `MultiNorm` must be of shape "
3493
- f"({ n_variables } , ...), orhave a data type with "
3494
- f"{ n_variables } fields." )
3498
+ f"({ n_variables } , ...), orbe structured array or scalar "
3499
+ f"with { n_variables } fields." )
3495
3500
return data
3496
3501
3497
3502