Skip to content

Commit

Permalink
fixed test_utils of projection where == replaced by np.isclose
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisRalli committed Mar 15, 2023
1 parent 0412a36 commit de82689
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_projection/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

def test_norm():
arr = np.random.random(100)
assert(np.linalg.norm(arr) == norm(arr))
assert np.isclose(np.linalg.norm(arr) == norm(arr))

def test_lp_norm():
arr = np.random.random(100)
p = np.random.randint(1, 10)
assert(np.linalg.norm(arr, ord=p) == lp_norm(arr, p=p))
assert np.isclose(np.linalg.norm(arr, ord=p) == lp_norm(arr, p=p))

def test_update_eigenvalues_insufficient_basis():
G1 = IndependentOp.from_list(['IZ', 'ZI'])
Expand Down

0 comments on commit de82689

Please sign in to comment.