title: Converters behavior in NumPy loadtxt not understood
body: <p>I am trying to read in data from a text file using numpy.loadtxt with the converters argument. I have a mixture of columns of ints and strings. The code is:</p>
  
  <pre><code>a, b, c, d, e = np.loadtxt(infile, delimiter = ',', usecols=(0, 2, 5, 8, 9), skiprows = 1,
                             unpack = True, converters = dict(zip((0, 2, 5, 8, 9), (int, float, float, int, int))))
  </code></pre>
  
  <p>The data are read in correctly and unpacked correctly, but all the variables (a, b, c, d, and e) end up as floats. Am I making a mistake in the converters syntax?</p>
  
  <p><strong>Edit trying answer</strong></p>
  
  <p>I tried using dtype = (int,float,float,int,int) as suggested by @joris as:</p>
  
  <pre><code>a,b,c,d,e = np.loadtxt(infile,delimiter = ',', usecols=(0,2,5,8,9), skiprows = 1, unpack = True, dtype = (int,float,float,int,int))
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <pre><code>     41                                            skiprows = 1,
       42                                            unpack = True,
  ---&gt; 43                                            dtype = (int,float,float,int,int))
       44
       45
  
  /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/npyio.pyc in loadtxt(fname, dtype, comments, delimiter, converters, skiprows, usecols, unpack)
      665     try:
      666         # Make sure we're dealing with a proper dtype
  
  --&gt; 667         dtype = np.dtype(dtype)
      668         defconv = _getconv(dtype)
      669
  
  TypeError: data type not understood
  WARNING: Failure executing file: &lt;forward_NDMMF.py&gt;
  </code></pre>
  
  <p>I am using NumPy v. 1.5.1.</p>