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

Function _scalar_tester

lib/matplotlib/tests/test_colors.py:813–819  ·  view source on GitHub ↗

Checks if scalars and arrays are handled the same way. Tests only for float.

(norm_instance, vals)

Source from the content-addressed store, hash-verified

811
812
813def _scalar_tester(norm_instance, vals):
814 """
815 Checks if scalars and arrays are handled the same way.
816 Tests only for float.
817 """
818 scalar_result = [norm_instance(float(v)) for v in vals]
819 assert_array_almost_equal(scalar_result, norm_instance(vals))
820
821
822def _mask_tester(norm_instance, vals):

Callers 2

test_NormalizeFunction · 0.85
test_SymLogNormFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…