0
x.shape = (256,1) 
y.shape = (256,1)

how should I command?, so that it returns,

output.shape = (256,2).

Simple question, but I am unable to solve. please help.

Ben
  • 47
  • 1
  • 8
  • 1
    `np.concatenate((x,y),axis=1)` https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.concatenate.html or `hstack` https://docs.scipy.org/doc/numpy-1.15.0/reference/generated/numpy.hstack.html – Dan Jan 17 '19 at 10:44
  • it works.Thanks. – Ben Jan 17 '19 at 10:46

1 Answers1

0

I'm using for this append option:

import numpy as np

matrix_1 = np.random.uniform(1, 10, (256, 1))
matrix_2 = np.random.uniform(1, 10, (256, 1))

print(matrix_1.shape)
print(matrix_2.shape)
print('-------------')

out_matrix = np.append(matrix_1, matrix_2, axis=1)
print(out_matrix.shape)