@@ -79,14 +79,14 @@ def limit_range_for_scale(self, vmin, vmax, minpos):
79
79
return vmin , vmax
80
80
81
81
82
- class TransformScaleBase ( Transform ):
82
+ class _TransformScaleCopyable ( ):
83
83
"""Base transform for scales to allow a deep copy"""
84
84
def __deepcopy__ (self , memo ):
85
85
return self .frozen ()
86
86
87
+ __copy__ = __deepcopy__
87
88
88
- class LinearTransform (TransformScaleBase , IdentityTransform ):
89
- """Mixed class for Identity"""
89
+ class LinearTransform (_TransformScaleCopyable , IdentityTransform ):
90
90
pass
91
91
92
92
@@ -124,9 +124,9 @@ def get_transform(self):
124
124
return LinearTransform ()
125
125
126
126
127
- class FuncTransform (TransformScaleBase ):
127
+ class FuncTransform (_TransformScaleCopyable , Transform ):
128
128
"""
129
- A simple transform that takes and arbitrary function for the
129
+ A transform that takes and arbitrary function for the
130
130
forward and inverse transform.
131
131
"""
132
132
@@ -202,7 +202,7 @@ def set_default_locators_and_formatters(self, axis):
202
202
axis .set_minor_locator (NullLocator ())
203
203
204
204
205
- class LogTransform (TransformScaleBase ):
205
+ class LogTransform (_TransformScaleCopyable , Transform ):
206
206
input_dims = output_dims = 1
207
207
208
208
@_api .rename_parameter ("3.3" , "nonpos" , "nonpositive" )
@@ -244,7 +244,7 @@ def inverted(self):
244
244
return InvertedLogTransform (self .base )
245
245
246
246
247
- class InvertedLogTransform (TransformScaleBase ):
247
+ class InvertedLogTransform (_TransformScaleCopyable , Transform ):
248
248
input_dims = output_dims = 1
249
249
250
250
def __init__ (self , base ):
@@ -370,7 +370,7 @@ def get_transform(self):
370
370
return self ._transform
371
371
372
372
373
- class SymmetricalLogTransform (TransformScaleBase ):
373
+ class SymmetricalLogTransform (_TransformScaleCopyable , Transform ):
374
374
input_dims = output_dims = 1
375
375
376
376
def __init__ (self , base , linthresh , linscale ):
@@ -402,7 +402,7 @@ def inverted(self):
402
402
self .linscale )
403
403
404
404
405
- class InvertedSymmetricalLogTransform (TransformScaleBase ):
405
+ class InvertedSymmetricalLogTransform (_TransformScaleCopyable , Transform ):
406
406
input_dims = output_dims = 1
407
407
408
408
def __init__ (self , base , linthresh , linscale ):
@@ -505,7 +505,7 @@ def get_transform(self):
505
505
return self ._transform
506
506
507
507
508
- class LogitTransform (TransformScaleBase ):
508
+ class LogitTransform (_TransformScaleCopyable , Transform ):
509
509
input_dims = output_dims = 1
510
510
511
511
@_api .rename_parameter ("3.3" , "nonpos" , "nonpositive" )
@@ -531,7 +531,7 @@ def __str__(self):
531
531
return "{}({!r})" .format (type (self ).__name__ , self ._nonpositive )
532
532
533
533
534
- class LogisticTransform (TransformScaleBase ):
534
+ class LogisticTransform (_TransformScaleCopyable , Transform ):
535
535
input_dims = output_dims = 1
536
536
537
537
@_api .rename_parameter ("3.3" , "nonpos" , "nonpositive" )
0 commit comments