MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / __init__

Method __init__

lib/matplotlib/scale.py:241–260  ·  view source on GitHub ↗

Parameters ---------- forward : callable The forward function for the transform. This function must have an inverse and, for best behavior, be monotonic. It must have the signature:: def forward(values: array-like) -> arra

(self, forward, inverse)

Source from the content-addressed store, hash-verified

239 input_dims = output_dims = 1
240
241 def __init__(self, forward, inverse):
242 """
243 Parameters
244 ----------
245 forward : callable
246 The forward function for the transform. This function must have
247 an inverse and, for best behavior, be monotonic.
248 It must have the signature::
249
250 def forward(values: array-like) -> array-like
251
252 inverse : callable
253 The inverse of the forward function. Signature as ``forward``.
254 """
255 super().__init__()
256 if callable(forward) and callable(inverse):
257 self._forward = forward
258 self._inverse = inverse
259 else:
260 raise ValueError('arguments to FuncTransform must be functions')
261
262 def transform_non_affine(self, values):
263 return self._forward(values)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected