You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the following code with julia test.jl shows type instability, but I believe the code is type stable.
test.jl
using LinearAlgebra
using InteractiveUtils
functionhey(q)
A =kron([11; 11], [11; 11])
B =kron([11; 11], [10; 01])
ifnorm(q) >1.0return A
elsereturn A - B
endendfunctionfoo(f)
returnf.([[1.0, 1.0], [1.0, 0.0]])
end# hey([1.0, 0.0])@code_warntypefoo(hey)
Running the following code with
julia test.jl
shows type instability, but I believe the code is type stable.test.jl
The output is
However, uncomment the line
hey([1.0, 0.0])
fix the issue.This has been tested on 1.9.0, 1.8.5 and 1.6.7.
The text was updated successfully, but these errors were encountered: