Hi
I have the array data = [[0.12,0.5],[0.08,0.3]]
how can assign it so that X = 0.12 or 0.08
I've tried X = [:,0]
But I keep getting an indentation error?
Sorry, I didn't quite understand you - what do you mean by "0.12 or 0.08"? A variable can't have two values at the same time. If you meant an array of first variable from an array of arrays, then something like this:
let data = [[0.12,0.5],[0.08,0.3]]
var firsts: array[data.len, float]
for i, arr in data:
firsts[i] = arr[0]
echo firsts