Created
November 10, 2020 17:57
-
-
Save toyballz/d765329a58bba353818e6427f13fb57e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @ is explicit operator for the dot product | |
def proj_matrix(v): | |
return v @ np.linalg.inv(v.T@v) @ v.T | |
def proj(vector, plane): | |
return proj_matrix(vector) @ plane |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment