def test_SymLogNorm():
 norm = mcolors.SymLogNorm(3, vmax=5, linscale=1.2)
 vals = np.array([(-30), (-1), 2, 6], dtype=float)
 normed_vals = norm(vals)
 expected = [0.0, 0.53980074, 0.826991, 1.02758204]
 assert_array_almost_equal(normed_vals, expected)
 _inverse_tester(norm, vals)
 _scalar_tester(norm, vals)
 _mask_tester(norm, vals)
 norm = mcolors.SymLogNorm(3, vmin=(-30), vmax=5, linscale=1.2)
 normed_vals = norm(vals)
 assert_array_almost_equal(normed_vals, expected)

def test_SymLogNorm ( ) : norm = mcolors . SymLogNorm ( 3 , vmax = 5 , linscale = 1.2 ) vals = np . array ( [ ( - 30 ) , ( - 1 ) , 2 , 6 ] , dtype = float ) normed_vals = norm ( vals ) expected = [ 0.0 , 0.53980074 , 0.826991 , 1.02758204 ] assert_array_almost_equal ( normed_vals , expected ) _inverse_tester ( norm , vals ) _scalar_tester ( norm , vals ) _mask_tester ( norm , vals ) norm = mcolors . SymLogNorm ( 3 , vmin = ( - 30 ) , vmax = 5 , linscale = 1.2 ) normed_vals = norm ( vals ) assert_array_almost_equal ( normed_vals , expected )
test symlognorm behavior .