title: About concatenating two vectors in python
body: <p>I have a vector <code>y</code> of size <code>4 x 1</code> , and another vector <code>y2</code> of size <code>1 x 4</code>, I need to concatenate the vectors <code>y</code> and real and imaginary parts of <code>y2</code>. </p>
  
  <p>The problem is that when I reshape the vector <code>y2</code> into vector <code>4 x 1</code>, and then concatenate it with vector <code>y</code>, it gives me an error of <code>'all the input array dimensions except for the concatenation axis must match exactly'</code> .</p>
  
  <p>Here is the code I made, So <code>Y3</code> is expected to be a vector of size <code>12 x 1</code>, but the last command gives an error:</p>
  
  <pre><code>import numpy as np
  
  h = np.random.randn(4, 4) + 1j * np.random.randn(4, 4)
  x = np.array([[1 + 1j], [0 + 0j], [0 + 0j], [0 + 0j]])
  y = h.dot(x)
  n = 3
  y2 = np.zeros((1, 4), dtype=np.complex)
  for ii in range(n):
      y2[: , ii] = np.linalg.pinv(h[: , ii].reshape(-1,1)).dot(x)
  y_con = np.concatenate((np.real(y2),np.imag(y2)))
  y_m = np.absolute(y)
  y_con2 = y_con.reshape(8,1)
  Y3 = np.concatenate((y_con2, y_m))
  </code></pre>