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

Method test_transforms

lib/matplotlib/tests/test_scale.py:277–290  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

275
276class TestAsinhScale:
277 def test_transforms(self):
278 a0 = 17.0
279 a = np.linspace(-50, 50, 100)
280
281 forward = AsinhTransform(a0)
282 inverse = forward.inverted()
283 invinv = inverse.inverted()
284
285 a_forward = forward.transform_non_affine(a)
286 a_inverted = inverse.transform_non_affine(a_forward)
287 assert_allclose(a_inverted, a)
288
289 a_invinv = invinv.transform_non_affine(a)
290 assert_allclose(a_invinv, a0 * np.arcsinh(a / a0))
291
292 def test_init(self):
293 fig, ax = plt.subplots()

Callers

nothing calls this directly

Calls 5

invertedMethod · 0.95
transform_non_affineMethod · 0.95
AsinhTransformClass · 0.90
invertedMethod · 0.45
transform_non_affineMethod · 0.45

Tested by

no test coverage detected