| 493 | input_dims = output_dims = 1 |
| 494 | |
| 495 | def __init__(self, base, linthresh, linscale): |
| 496 | super().__init__() |
| 497 | if base <= 1.0: |
| 498 | raise ValueError("'base' must be larger than 1") |
| 499 | if linthresh <= 0.0: |
| 500 | raise ValueError("'linthresh' must be positive") |
| 501 | if linscale <= 0.0: |
| 502 | raise ValueError("'linscale' must be positive") |
| 503 | self.base = base |
| 504 | self.linthresh = linthresh |
| 505 | self.linscale = linscale |
| 506 | |
| 507 | def transform_non_affine(self, values): |
| 508 | linscale_adj = self.linscale / (1.0 - 1.0 / self.base) |