Thanks. so there is no way to create an array from its corresponding type otherwise? Is there a reason for that behind the design of julia?
cheers ------------------------------------------ Carlos On Fri, Feb 21, 2014 at 1:51 PM, Mauro <[email protected]> wrote: > This works but is not pretty: > Array(eltype(IdxListType),0) > > Alternatively > typealias IdxType Int64 > IdxType[] > > On Friday, February 21, 2014 11:31:42 AM UTC, Carlos Becker wrote: >> >> Hello, >> >> this looks like a naive question, but I cannot get my way through >> >> I defined a typealias, like >> >> typealias IdxListType Array{Int64,1} >> >> which I want to initialize empty, and then add elements with push!(). >> >> My question is: how do I create an empty array of type IdxListType ? >> >> I know I can do Array( Int64, 0 ), but that doesn't use the typealias I >> defined, >> and IdxListType() is not defined either. >> >> >> Thanks in advance, >> Carlos >> >
