给定这两个 numpy 数组:
# Two 2-dim arrays with same row number but differnt column
a1 = np.array([[9,9,9,9], [9,9,9,9],[9,9,9,9]], dtype=np.int64)
a2 = np.array([[3],[3],[3]], dtype=np.int64)
如何将这些数组合并到数组 2 创建第三个数组,如下所示:
# Third array with same row numbers as above two arrays but its column number is the sum of column numbers of the above two arrays
[[9,9,9,9,3],
[9,9,9,9,3],
[9,9,9,9,3]]
简单来说,如何将列连接到二维数组?
慕娘9325324
相关分类