Skip to content

Commit

Permalink
Fixed test for complex eigenvectors
Browse files Browse the repository at this point in the history
  • Loading branch information
momchilmm committed Jul 25, 2019
1 parent c030e0b commit 99342df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ def fun(x):
hmat = broadcast_dot_transpose(mat, mat)
check_grads(fun)(hmat)

# For complex-valued matrices, the gradient only works for the eigenvalues, but not for the eigenvectors
# For complex-valued matrices, the eigenvectors could have arbitrary phases (gauge)
# which makes it impossible to compare to numerical derivatives. So we take the
# absolute value to get rid of that phase.
def test_eigvalh_lower_complex():
def fun(x):
w, v = np.linalg.eigh(x)
Expand Down

0 comments on commit 99342df

Please sign in to comment.