mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-12 05:22:38 +02:00
Fixed linalg for general matricies
This commit is contained in:
parent
2dcfabf300
commit
16e6d39317
2 changed files with 8 additions and 7 deletions
|
|
@ -53,7 +53,8 @@ class LinalgTests(np.testing.TestCase):
|
|||
|
||||
def test_einsum_ijk_ljk_to_ilk(self):
|
||||
A = np.random.randn(150, 20, 5)
|
||||
B = np.random.randn(20, 30, 5)
|
||||
pure = np.einsum('ijk,jlk->il', A, B)
|
||||
quick = GPy.util.linalg.ijk_jlk_to_il(A,B)
|
||||
B = np.random.randn(150, 20, 5)
|
||||
#B = A.copy()
|
||||
pure = np.einsum('ijk,ljk->ilk', A, B)
|
||||
quick = GPy.util.linalg.ijk_ljk_to_ilk(A,B)
|
||||
np.testing.assert_allclose(pure, quick)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue