I have two numpy arrays of huge size. Each array has the shape of (7, 960000, 200)
. I want to concatenate them using np.concatenate((arr1, arr2), axis=1)
so that the final shape would be (7, 1920000, 200)
. The problem is, they already filled up my ram, and there is no enough room in the ram to do the concatenation operation, hence, the execution is killed. Same thing for the np.stack
. So, I thought of making a new array which points to the two arrays in order, and this new array should have the same effect as combining the arrays; they should be contiguous as well.
So, how to do so? And, is there a better way to combining them than the idea I suggested?