You can use Compat.jl :

julia> Compat.@compat Tuple{Int,Int}[(z, 2z) for z in 1:3]
3-element Array{(Int64,Int64),1}:
 (1,2)
 (2,4)
 (3,6)

(this is for 0.3; without @compat I get Array{(Any...,),1})

Best,

Alex.

On Thursday, 30 April 2015 11:53:32 UTC+2, Jim Garrison wrote:
>
> In Julia 0.3, I can create an empty array of tuples as follows:
>
>     julia> (Int,Int)[]
>     0-element Array{(Int64,Int64),1}
>
> If I want, I can even initialize it with a comprehension.
>
>     julia> (Int,Int)[(z, 2z) for z in 1:3]
>     3-element Array{(Int64,Int64),1}:
>      (1,2)
>      (2,4)
>      (3,6)
>
> On 0.4 (since the merging of #10380), both of these fail.  How can I get 
> my code to work again?  Also, is there any planned deprecation path that 
> would allow this code to continue working, albeit with a deprecation 
> warning?
>

Reply via email to