Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- # Example array
- X = np.array([[[0, 0], [1, -1]], [[-1, 1], [0, 0]]])
- # Array containing the norms
- N = np.vstack((np.linalg.norm(D[0], axis=1), np.linalg.norm(D[1],
- axis=1)))
- R = np.divide(X, N)
- R = np.array([[[0, 0], [0.70710678, -0.70710678]], [[-0.70710678, 0.70710678], [0, 0]]])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement