i have a 3-d array and i want to create a new array that each second elements of 3-d array must be increased by 1 until the second element reach to a certain value.
(我有一个3-d数组,我想创建一个新数组,必须将3-d数组的每个第二元素加1,直到第二个元素达到某个值。)
for example i have a 3-d array like below as an input and need to obtain my expected output :
(例如,我有一个像下面这样的3-d数组作为输入,需要获得我的预期输出:)
#input = [[[1,1],[2,2],[3,3],[4,4]],[[1,1],[2,2],[3,3],[4,4]]]
#This is my expected output:
[[[1,1],[2,2],[3,3],[4,4]],[[1,1],[2,2],[3,3],[4,4]],
[[1,2],[2,3],[3,4],[4,5]],[[1,2],[2,3],[3,4],[4,5]],
[[1,3],[2,4],[3,5],[4,6]],[[1,3],[2,4],[3,5],[4,6]],
[[1,4],[2,5],[3,6],[4,7]],[[1,4],[2,5],[3,6],[4,7]],
[[1,5],[2,6],[3,7],[4,8]],[[1,5],[2,6],[3,7],[4,8]]]
ask by user11794094 translate from so