title: How to combine column vectors into a matrix
body: <p>How do I combine multiple column vectors into a Matrix? For example, if I have 3 10 x 1 vectors, how do I put them into a 10 x 3 matrix?
   Here's what I've tried so far:</p>
  
  <pre><code>D0 =np.array([[np.cos(2*np.pi*f*time)],[np.sin(2*np.pi*f*time)],np.ones((len(time),1)).transpose()],'float').transpose()
  </code></pre>
  
  <p>this gives me something like this ,</p>
  
  <pre><code>[[[ 1.00000000e+00  0.00000000e+00  1.00000000e+00]]
  
   [[ 9.99999741e-01  7.19053432e-04  1.00000000e+00]]
  
   [[ 9.99998966e-01  1.43810649e-03  1.00000000e+00]]
  
   ...
  
   [[ 9.99998966e-01 -1.43810649e-03  1.00000000e+00]]
  
   [[ 9.99999741e-01 -7.19053432e-04  1.00000000e+00]]
  
   [[ 1.00000000e+00 -2.15587355e-14  1.00000000e+00]]]
  </code></pre>
  
  <p>but, I don't think this is right, it looks more like an array of lists (and I couldn't do matrix multiplication with this form)...I tried numpy.concatenate as well, but that didn't work for me either...Looking into stack next....</p>
  
  <p>In Matlab notation, I need to get this into a form </p>
  
  <pre><code>D0 =[cos(2*pi*f *t1), sin(2*pi*f*t1) ,1; cos(2*pi*f*t2), sin(2*pi*f*t2) ,1;....] etc
  </code></pre>
  
  <p>So that I can find the least squares solution s_hat:  </p>
  
  <pre><code>s_hat = (D0^T D0)^-1(D0^T x)
  </code></pre>
  
  <p>where x is another input vector containing the samples of the sinusoid I'm trying to fit.</p>
  
  <p>In Matlab, I could just type </p>
  
  <pre><code>D0 = [cos(2*np.pi*f*time),sin(2*np.pi*f*time), repmat(1,len(time),1)]
  </code></pre>
  
  <p>to create the D0 matrix.  How do I do this in python?</p>
  
  <p>Thank you!</p>