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

Function test_proj_transform

lib/mpl_toolkits/mplot3d/tests/test_axes3d.py:1202–1215  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1200
1201
1202def test_proj_transform():
1203 M = _test_proj_make_M()
1204 invM = np.linalg.inv(M)
1205
1206 xs = np.array([0, 1, 1, 0, 0, 0, 1, 1, 0, 0]) * 300.0
1207 ys = np.array([0, 0, 1, 1, 0, 0, 0, 1, 1, 0]) * 300.0
1208 zs = np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1]) * 300.0
1209
1210 txs, tys, tzs = proj3d.proj_transform(xs, ys, zs, M)
1211 ixs, iys, izs = proj3d.inv_transform(txs, tys, tzs, invM)
1212
1213 np.testing.assert_almost_equal(ixs, xs)
1214 np.testing.assert_almost_equal(iys, ys)
1215 np.testing.assert_almost_equal(izs, zs)
1216
1217
1218def _test_proj_draw_axes(M, s=1, *args, **kwargs):

Callers

nothing calls this directly

Calls 2

_test_proj_make_MFunction · 0.85
assert_almost_equalMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…