Is it possible to fill up zero values with arange without iterations:
Initial array:
array([128, 0, 128, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0,
0, 0, 128, 128, 0, 0, 128, 128, 128, 0, 0, 0, 0,
0, 0, 0, 128, 0, 0, 0, 0, 0, 128, 0, 0, 128,
128, 0, 0, 128, 0, 0, 0, 128, 0, 0, 128, 128, 0,
0, 0, 128, 128], dtype=uint8)
new array:
array([128, 0, 128, 0, 1, 2, 128, 0, 1, 2, 3, 4, 5,
6, 7, 128, 128, 0, 1, 128, 128, 128, 0, 1, 2, 3,
4, 5, 6, 128, 0, 1, 2, 3, 4, 128, 0, 1, 128,
128, 0, 1, 128, 0, 1, 2, 128, 0, 1, 128, 128, 0,
1, 2, 128, 128], dtype=uint8)