title: numpy loadtxt ValueError: invalid literal for float()
body: <pre><code>import numpy as n
  
  a=n.loadtxt("data.txt",dtype=[('ID',int),('ID2',int),('ID3',int),
                                ('GENDER','|S1'),('ID4',int),('ID5',int)])
  
  print len(n.unique(a[a['GENDER']==f]['ID']))
  </code></pre>
  
  <p>I have problem with this code,I was trying to count how many womans I have in my data file,so I used numpy .loadtxt and .unique but I've got strange (for me) error</p>
  
  <pre><code>Traceback (most recent call last):
  File "C:\Python27\Lib\site-packages\xy\bazy.py", line 78, in &lt;module&gt;
  a=n.loadtxt("C:\\Users\\DzwiedzN7\\Desktop\\plec.txt",dtype=[('ID',int),('U-  ID',int),('KIER',int),('PLEC','|S1'),('TRYB',int),('RODZAJ',int)])
  File "C:\Python27\lib\site-packages\numpy\lib\npyio.py", line 848, in loadtxt
  items = [conv(val) for (conv, val) in zip(converters, vals)]
  File "C:\Python27\lib\site-packages\numpy\lib\npyio.py", line 616, in &lt;lambda&gt;
  return lambda x: int(float(x))
  ValueError: invalid literal for float(): 0,6288,10,f,3,4
  </code></pre>
  
  <p>I don't get it,what is about this iteral for float?There is no float and it shouldn't be.</p>