I'm working on Torch/Lua and have an array dataset
of 10 elements.
dataset = {11,12,13,14,15,16,17,18,19,20}
If I write dataset[1]
, I can read the structure of the 1st element of the array.
th> dataset[1]
11
I need to select just 3 elements among all the 10, but I don't know which command to use.
If I were working on Matlab, I would write: dataset[1:3]
, but here does not work.
Do you have any suggestions?