We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 821f52b commit 12b11f3Copy full SHA for 12b11f3
test/testsuite/ad_utils.jl
@@ -50,9 +50,7 @@ function make_eig_matrix(T, sz)
50
D, V = eig_full(A)
51
stabilize_eigvals!(diagview(D))
52
Ac = V * D * inv(V)
53
- Af = similar(A)
54
- Af .= (T <: Real) ? T.(real.(Ac)) : Ac
55
- return Af
+ return (eltype(T) <: Real) ? real(Ac) : Ac
56
end
57
function make_eigh_matrix(T, sz)
58
A = project_hermitian!(instantiate_matrix(T, sz))
0 commit comments