You make x
change its type. Did you mean x .*= 1
? Or you can use another variable, as in
function good3(x::Array{T,1}) where T<:Float64
n = length(x)
y = x * 1
[y[i] for i in 1:n]
end
Also see this suggestion in the manual.
You make x
change its type. Did you mean x .*= 1
? Or you can use another variable, as in
function good3(x::Array{T,1}) where T<:Float64
n = length(x)
y = x * 1
[y[i] for i in 1:n]
end
Also see this suggestion in the manual.