title: How to create a numpy matrix with differing column data types?
body: <p>Lets say I have three vectors <code>a</code>, <code>b</code>, and <code>c</code>:</p>
  
  <pre><code>a = np.array([1,2,3])
  b = np.array([1.2, 3.2, 4.5])
  c = np.array([True, True, False])
  </code></pre>
  
  <p>What is the simplest way to turn this into a matrix <code>d</code> of differing data types and column labels, as such:</p>
  
  <pre><code>d = ([[1, 1.2, True],
       [2, 3.2, True], 
       [3, 4.5, False]], 
       dtype=[('aVals','i8'), ('bVals','f4'), ('cVals','bool')])
  </code></pre>
  
  <p>So that I can then save this matrix to a <code>.npy</code> file and access the data as such after opening it;</p>
  
  <pre><code>&gt;&gt;&gt; d = np.load('dFile')
  &gt;&gt;&gt; d['aVals']
  np.array([1,2,3], dtype = [('aVals', '&lt;i8)])
  </code></pre>
  
  <p>I have used a cimple <code>column_stack</code> to create the matrix, but I am getting a headache trying to figure out how to include the datatypes and column names, since <code>column_stack</code> does not accept a <code>dtype</code> argument, and I can't see a way to add field names and data types after the <code>column_stack</code> is preformed. It is worth mentioning that the vectors <code>a</code>, <code>b</code>, and <code>c</code> have no explicit datatypes declared upon their creation, they are as shown above. </p>