Hi all,

I would just like to ask a question about the type of array constructed via 
inner for loops, in the following:

julia> dummy = randn(10);

julia> typeof(dummy)
Array{Float64,1}

julia> typeof([dummy[kk] < 0.0 ? float64(0.0) : float(dummy[kk]) for kk =1:
10])
Array{Any,1}

julia> typeof(float64([dummy[kk] < 0.0 ? float64(0.0) : dummy[kk] for kk =1:
10]))
Array{Float64,1}


 why the second array has type Any (unless I force it to be float64 as in 
the third case), even if all elements are float64 ? But: 

julia> typeof([float64(kk) for kk = 1:10])
Array{Float64,1}

many thanks in advance

andrea

Reply via email to