Issue
Is there a Numpy built-in function that returns a cross product matrix?
That is:
>>> cross_product_matrix_function([1, 2, 3])
array([[ 0, -3, 2],
[ 3, 0, -1],
[-2, 1, 0]])
Solution
For 3x3 matricies:
import numpy as np
I = np.eye(3)
def cross_product_matrix_function(m):
return np.cross(I, m)
print(cross_product_matrix_function([1, 2, 3]))
Answered By - K1521
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.