@@ -3233,7 +3233,7 @@ def __init__(self, norms, vmin=None, vmax=None, clip=False):
3233
3233
"""
3234
3234
Parameters
3235
3235
----------
3236
- norms : List of strings or `Normalize` objects
3236
+ norms : List of (str, `Normalize` or None)
3237
3237
The constituent norms. The list must have a minimum length of 2.
3238
3238
vmin, vmax : float, None, or list of float or None
3239
3239
Limits of the constituent norms.
@@ -3248,7 +3248,7 @@ def __init__(self, norms, vmin=None, vmax=None, clip=False):
3248
3248
3249
3249
"""
3250
3250
3251
- if isinstance ( norms , str ) or not np . iterable (norms ):
3251
+ if cbook . is_scalar_or_string (norms ):
3252
3252
raise ValueError ("A MultiNorm must be assigned multiple norms" )
3253
3253
3254
3254
norms = [* norms ]
@@ -3349,7 +3349,7 @@ def __call__(self, value, clip=None):
3349
3349
3350
3350
Returns
3351
3351
-------
3352
- Data
3352
+ List
3353
3353
Normalized input values as a list of length `n_variables`
3354
3354
3355
3355
Notes
@@ -3401,7 +3401,7 @@ def autoscale_None(self, A):
3401
3401
Parameters
3402
3402
----------
3403
3403
A
3404
- Data, must be of length `n_variables` or be an np.ndarray type with
3404
+ Data, must be of length `n_variables` or have a data type with
3405
3405
`n_variables` fields.
3406
3406
"""
3407
3407
with self .callbacks .blocked ():
@@ -3412,7 +3412,7 @@ def autoscale_None(self, A):
3412
3412
3413
3413
def scaled (self ):
3414
3414
"""Return whether both *vmin* and *vmax* are set on all constituent norms"""
3415
- return all ([( n . vmin is not None and n . vmax is not None ) for n in self .norms ])
3415
+ return all ([n . scaled ( ) for n in self .norms ])
3416
3416
3417
3417
@staticmethod
3418
3418
def _iterable_variates_in_data (data , n_variables ):
@@ -3430,7 +3430,7 @@ def _iterable_variates_in_data(data, n_variables):
3430
3430
3431
3431
Returns
3432
3432
-------
3433
- list of np.ndarray
3433
+ list of np.ndarray
3434
3434
3435
3435
"""
3436
3436
if isinstance (data , np .ndarray ) and data .dtype .fields is not None :
@@ -4087,9 +4087,9 @@ def _get_scale_cls_from_str(scale_as_str):
4087
4087
4088
4088
Used in the creation of norms from a string to ensure a reasonable error
4089
4089
in the case where an invalid string is used. This would normally use
4090
- `_api.check_getitem()`, which would produce the error
4091
- > 'not_a_norm' is not a valid value for norm; supported values are
4092
- > 'linear', 'log', 'symlog', 'asinh', 'logit', 'function', 'functionlog'
4090
+ `_api.check_getitem()`, which would produce the error:
4091
+ 'not_a_norm' is not a valid value for norm; supported values are
4092
+ 'linear', 'log', 'symlog', 'asinh', 'logit', 'function', 'functionlog'.
4093
4093
which is misleading because the norm keyword also accepts `Normalize` objects.
4094
4094
4095
4095
Parameters
0 commit comments