Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def project_vectors_table_on_z_axis(vectors: np.ndarray) -> np.ndarray:
- projection_vectors = np.zeros_like(vectors)
- projection_vectors[:, 2] = 1
- vectors *= projection_vectors
- vectors = (vectors[:, 0] + vectors[:, 1] + vectors[:, 2]).reshape((-1, 1))
- zero_axis = np.zeros_like(vectors)
- vectors = np.hstack((zero_axis, zero_axis, vectors))
- return vectors
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement