Ferenc
Ferenc

Reputation: 874

How to allocate memory for a tuple array in Julia?

Is it possible to allocate memory for a Tuple{String,Any} type in Julia like

s = 100
tup_array = Tuple{String,Any}[s] 

If so, how?

Upvotes: 3

Views: 432

Answers (1)

IainDunning
IainDunning

Reputation: 11644

You can do (on Julia 0.4):

s = 100
tup_array = Array(Tuple{String,Any}, s)

Upvotes: 4

Related Questions