如何仅展平numpy数组的某些维度 - How to flatten only some dimensions of a numpy array

问题:

Is there a quick way to "sub-flatten" or flatten only some of the first dimensions in a numpy array? 有没有一种快速的方法来“平整”或平整一些numpy数组中的第一个维度?

For example, given a numpy array of dimensions (50,100,25) , the resultant dimensions would be (5000,25) 例如,给定一个numpy维数(50,100,25) ,结果维数为(5000,25)


解决方案:

参考: https://stackoom.com/en/question/1GhkE
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章