title: Data type conversion and map object error in Python, TypeError: a bytes-like object is required, not 'map'
body: <p>I have a newbie question regard data type conversion in Python:</p>
  
  <p>Assuming I have an np.array object as:</p>
  
  <pre><code>X = np.array([[1.,2.,0.5,2.],[2.,3.,0.7,2.],[3.,2.,0.65,1.]])
  </code></pre>
  
  <p>I wanted to convert each value in columns <code>[0,1,3]</code> into integer format using the syntax below:</p>
  
  <pre><code>Y = np.array(map(tuple,X),dtype=[('col0',int),('col1',int),('col2',float),('col3',int)]) 
  </code></pre>
  
  <p>My expectation for <code>Y</code> is an array of the same shape with <code>X</code>, but each of the list element is convert to tuple and corresponding data type for each column, i.e.,</p>
  
  <pre><code>Y = np.array([(1,2,0.5,2),(2,3,0.7,2),(3,2,0.65,1)])
  </code></pre>
  
  <p>However, I encountered an TypeError: a bytes-like object is required, not 'map'</p>
  
  <p>So I have 2 native questions:
  1) Is the expectation for the output Y correct?
  2) How to fix the TypeError?</p>