We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4e2f8f commit a22a1c3Copy full SHA for a22a1c3
1 file changed
test/testsuite/ad_utils.jl
@@ -41,7 +41,8 @@ function stabilize_eigvals!(D::AbstractVector)
41
# rescale eigenvalues so that they lie on distinct radii in the complex plane
42
# that are chosen randomly in non-overlapping intervals [k/n, (k+0.5)/n)] for k=1,...,n
43
radii = ((1:n) .+ rand(real(eltype(D)), n) ./ 2) ./ n
44
- D .= sign.(D) .* radii[p]
+ hD .= sign.(collect(D)) .* radii[p]
45
+ copyto!(D, hD)
46
return D
47
end
48
function make_eig_matrix(T, sz)
0 commit comments