Solved by Hunbo in post #3 
              
              
                Thank you! I actually found another solution, using: 

gt = gt.repeat(2, 1, 1) 

and then repeating the rest of the original code.