Closed vaipatel closed 5 years ago
Here is some code to see how np.swapaxes
can be used with np.matmul
or @
magic.
X, Y = np.random.randn(3,20,2), np.random.randn(3,20,2)
C = Y.swapaxes(1,2) @ X
# C will contain 3 2x2 matrices.
Implemented in ea39930, tested in 7f78034
In GPA, the rotation step involves rotating all the landmark sets onto the current mean. It might possibly be faster to do such multiple rotations in one go, without having to trade up too much memory.