Skip to content

Commit

Permalink
mysterious failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
damonge committed Oct 6, 2024
1 parent e09a690 commit 6b48f30
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pymaster/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ def test_moore_penrose_pinv():
# Pick up largest eigval
e = e[:, w > 0.1].squeeze()
# Should only have two non-zero eigvals
print(w)
assert np.sum(np.fabs(w) < 1E-15) == 2
# Check e is parallel to v
print(np.dot(e, v))
print(np.dot(e, e))
assert np.isclose(np.dot(e, v),
np.sqrt(np.dot(e, e)))

Expand All @@ -73,6 +76,8 @@ def test_moore_penrose_pinv():
m = np.diag(w)
im = nmt.utils.moore_penrose_pinvh(m, None)
imb = np.diag(1/w)
print(im)
print(imb)
assert np.allclose(im, imb)


Expand Down

0 comments on commit 6b48f30

Please sign in to comment.