Is it possible to merge 2D Arrays in Python using numpy or something else ? I have about 200 2D arrays , all with the same Dimensions (1024,256) and want to add them to the lower end of each other. The final shape after adding e.g. 3 of them then should be (1024,768).
Share
Three arrays of (1024,256) have to be appended to the right end, not the lower end. You are stacking them horizontally next to each other (1024 rows, 256 columns).
Using
numpy.hstack(h as horizontal):lstis a list of (numpy or python) arrays(1024,256):returns a single numpy array
(1024,256*len(lst))