()
| 955 | |
| 956 | |
| 957 | def 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 | |
| 975 | def test_nonsingular(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…