Skip to content

Commit

Permalink
[src] Prevent complex eigen values in gev (asteroid-team#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldelebec authored Jun 21, 2021
1 parent d646e12 commit 86b6c7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion asteroid/dsp/beamforming.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def generalized_eigenvalue_decomposition(a, b):
if input_dtype not in [torch.float64, torch.complex128]:
solve_dtype = _precision_mapping()[input_dtype]
e_val, e_vec = _generalized_eigenvalue_decomposition(a.to(solve_dtype), b.to(solve_dtype))
return e_val.to(input_dtype), e_vec.to(input_dtype)
return e_val.to(input_dtype).real, e_vec.to(input_dtype)


def _generalized_eigenvalue_decomposition(a, b):
Expand Down

0 comments on commit 86b6c7b

Please sign in to comment.