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

Function inv_transform

lib/mpl_toolkits/mplot3d/proj3d.py:209–220  ·  view source on GitHub ↗

Transform the points by the inverse of the projection matrix, *invM*.

(xs, ys, zs, invM)

Source from the content-addressed store, hash-verified

207
208
209def inv_transform(xs, ys, zs, invM):
210 """
211 Transform the points by the inverse of the projection matrix, *invM*.
212 """
213 vec = _vec_pad_ones(xs, ys, zs)
214 vecr = np.dot(invM, vec)
215 if vecr.shape == (4,):
216 vecr = vecr.reshape((4, 1))
217 for i in range(vecr.shape[1]):
218 if vecr[3][i] != 0:
219 vecr[:, i] = vecr[:, i] / vecr[3][i]
220 return vecr[0], vecr[1], vecr[2]
221
222
223def _vec_pad_ones(xs, ys, zs):

Callers

nothing calls this directly

Calls 2

_vec_pad_onesFunction · 0.85
dotMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…