Stacking frames in BCHW format for DQN

Hello so I have to use BCHW format for my dqn and I have it working with 1 frame, and it’s a “grayscale” image, so no rgb values. I just have:
state = getState() -> 50x50 matrix
state= [None, None, :, : ]

However, I want to try stacking the frames and I’m not sure how I would go about doing that. So would I need a new array to store 4 bchw format “states” or could I give the number of layers as the channel in one bchw format state?

Also, would stacking affect anything else in the code that I should be aware of, like in the network?