我有一个5000*3072的多维数组,我使用以下命令将其分成5个1000*3072的块
numpy.array_split()
函数。现在对于迭代,我需要组合数组的不同组合
For example, 0th iteration: 1,2,3,4 chunks to combine
1st iteration: 0,2,3,4 chunks to combine
2nd iteration: 0,1,3,4 chunks to combine and so on
我尝试使用np.concatenate
,但它给出了错误:
ValueError:所有输入数组必须具有相同的维数
有没有其他的组合方式呢?
https://stackoverflow.com/questions/48339315
复制相似问题