Reputation: 393
I have several 2-dimentional arrays under a hdf5 file, how can I merge them together into one multi-dimentional array in PyTables?i.e., the file now is array A, arra yB, array C, i want them to be array X with 1st dimension A, 2nd dimension B, 3rd dimension C
Upvotes: 0
Views: 187
Reputation: 27615
I think you are looking for numpy.dstack()
.
From the docs:
Stack arrays in sequence depth wise (along third axis).
Takes a sequence of arrays and stack them along the third axis to make a single array.
All of them must have the same shape along all but the third axis.
Hope this helps. Love Numpy!
Upvotes: 1