我在hdf5文件下有几个二维数组,如何在PyTables中将它们合并为一个多维数组?即,文件现在是数组A,arra yB,数组C,我希望它们是阵列X具有第一维A,第二维B,第三维C
答案 0 :(得分:1)
我认为您正在寻找numpy.dstack()
。
来自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.
希望这会有所帮助。爱Numpy!