Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 656
Ferenc Avatar asked May 14 '26 19:05

Ferenc


1 Answers

You can do (on Julia 0.4):

s = 100
tup_array = Array(Tuple{String,Any}, s)
like image 136
IainDunning Avatar answered May 16 '26 08:05

IainDunning



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!