So essentially I have this variable question[1]
where question[1] is: [[1, 0, 0], [1, 0, 0], [0,1,0] ...]
I want to be able to add them vertically so I get one array like so
[1,0,0]+[1,0,0]=[2,0,0] + [0,1,0] = [2,1,0] + ....
Additionally, the arrays might be longer or shorter (but will be at least two long)
How could I do this?
The API Doc has the following example:
sequence1 = [100, 200, 300, 400]
sequence2 = [10, 20, 30, 40]
sequence3 = [1, 2, 3, 4]
r.map(sequence1, sequence2, sequence3,
lambda val1, val2, val3: (val1 + val2 + val3)).run(conn)
with result: [111, 222, 333, 444]
But this won't account for a variable amount of inputs as I want. Answer in python please!