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

Function test_transform_angles

lib/matplotlib/tests/test_transforms.py:957–972  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

955
956
957def test_transform_angles():
958 t = mtransforms.Affine2D() # Identity transform
959 angles = np.array([20, 45, 60])
960 points = np.array([[0, 0], [1, 1], [2, 2]])
961
962 # Identity transform does not change angles
963 new_angles = t.transform_angles(angles, points)
964 assert_array_almost_equal(angles, new_angles)
965
966 # points missing a 2nd dimension
967 with pytest.raises(ValueError):
968 t.transform_angles(angles, points[0:2, 0:1])
969
970 # Number of angles != Number of points
971 with pytest.raises(ValueError):
972 t.transform_angles(angles, points[0:2, :])
973
974
975def test_nonsingular():

Callers

nothing calls this directly

Calls 1

transform_anglesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…