结合numpy的阵列 [英] Combining NumPy arrays

查看:193
本文介绍了结合numpy的阵列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个20x100x3 numpy的阵列,我要合并成一个40×100×3阵,也就是说,只需添加更多的行数组。我对我想要的功能感到困惑:是vstack,hstack,column_stack或者别的东西。

I have two 20x100x3 NumPy arrays which I want to combine into a 40 x 100 x 3 array, that is, just add more lines to the array. I am confused by which function I want: is it vstack, hstack, column_stack or maybe something else?

推荐答案

我相信这是vstack你想要

I believe it's vstack you want

p=array_2
q=array_2
p=numpy.vstack([p,q])

这篇关于结合numpy的阵列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆