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

Function test_LogNorm_inverse

lib/matplotlib/tests/test_colors.py:519–527  ·  view source on GitHub ↗

Test that lists work, and that the inverse works

()

Source from the content-addressed store, hash-verified

517
518
519def test_LogNorm_inverse():
520 """
521 Test that lists work, and that the inverse works
522 """
523 norm = mcolors.LogNorm(vmin=0.1, vmax=10)
524 assert_array_almost_equal(norm([0.5, 0.4]), [0.349485, 0.30103])
525 assert_array_almost_equal([0.5, 0.4], norm.inverse([0.349485, 0.30103]))
526 assert_array_almost_equal(norm(0.4), [0.30103])
527 assert_array_almost_equal([0.4], norm.inverse([0.30103]))
528
529
530def test_PowerNorm():

Callers

nothing calls this directly

Calls 2

normFunction · 0.85
inverseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…