In this case, the best strategy is to use Float64[...] in the comprehension.
julia> println(typeof(Float64[g(x) for x in zeros(0)]))
Vector{Float64}
In this case, the best strategy is to use Float64[...] in the comprehension.
julia> println(typeof(Float64[g(x) for x in zeros(0)]))
Vector{Float64}