0

我在 hdf5 文件下有几个二维数组,如何将它们合并到 PyTables 中的一个多维数组中?即,文件现在是数组 A、数组 yB、数组 C,我希望它们是数组 X第 1 维 A、第 2 维 B、第 3 维 C

4

1 回答 1

1

我想你正在寻找numpy.dstack().

文档

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!

于 2012-05-21T03:41:56.907 回答