@@ -1416,13 +1416,13 @@ def __call__(self, value, clip=None):
1416
1416
return super ().__call__ (value , clip = clip )
1417
1417
1418
1418
1419
- def _make_norm_from_scale (scale_cls , base_norm_cls = None , * , init = None ):
1419
+ def make_norm_from_scale (scale_cls , base_norm_cls = None , * , init = None ):
1420
1420
"""
1421
1421
Decorator for building a `.Normalize` subclass from a `.Scale` subclass.
1422
1422
1423
1423
After ::
1424
1424
1425
- @_make_norm_from_scale (scale_cls)
1425
+ @make_norm_from_scale (scale_cls)
1426
1426
class norm_cls(Normalize):
1427
1427
...
1428
1428
@@ -1437,7 +1437,7 @@ class norm_cls(Normalize):
1437
1437
a dummy axis).
1438
1438
1439
1439
If the *scale_cls* constructor takes additional parameters, then *init*
1440
- should be passed to `_make_norm_from_scale `. It is a callable which is
1440
+ should be passed to `make_norm_from_scale `. It is a callable which is
1441
1441
*only* used for its signature. First, this signature will become the
1442
1442
signature of *norm_cls*. Second, the *norm_cls* constructor will bind the
1443
1443
parameters passed to it using this signature, extract the bound *vmin*,
@@ -1447,7 +1447,7 @@ class norm_cls(Normalize):
1447
1447
"""
1448
1448
1449
1449
if base_norm_cls is None :
1450
- return functools .partial (_make_norm_from_scale , scale_cls , init = init )
1450
+ return functools .partial (make_norm_from_scale , scale_cls , init = init )
1451
1451
1452
1452
if init is None :
1453
1453
def init (vmin = None , vmax = None , clip = False ): pass
@@ -1509,7 +1509,7 @@ def inverse(self, value):
1509
1509
return Norm
1510
1510
1511
1511
1512
- @_make_norm_from_scale (
1512
+ @make_norm_from_scale (
1513
1513
scale .FuncScale ,
1514
1514
init = lambda functions , vmin = None , vmax = None , clip = False : None )
1515
1515
class FuncNorm (Normalize ):
@@ -1542,7 +1542,7 @@ def forward(values: array-like) -> array-like
1542
1542
"""
1543
1543
1544
1544
1545
- @_make_norm_from_scale (functools .partial (scale .LogScale , nonpositive = "mask" ))
1545
+ @make_norm_from_scale (functools .partial (scale .LogScale , nonpositive = "mask" ))
1546
1546
class LogNorm (Normalize ):
1547
1547
"""Normalize a given value to the 0-1 range on a log scale."""
1548
1548
@@ -1555,7 +1555,7 @@ def autoscale_None(self, A):
1555
1555
super ().autoscale_None (np .ma .masked_less_equal (A , 0 , copy = False ))
1556
1556
1557
1557
1558
- @_make_norm_from_scale (
1558
+ @make_norm_from_scale (
1559
1559
scale .SymmetricalLogScale ,
1560
1560
init = lambda linthresh , linscale = 1. , vmin = None , vmax = None , clip = False , * ,
1561
1561
base = 10 : None )
0 commit comments