thouis / numpy-trac-migration

numpy Trac to github issues migration
2 stars 3 forks source link

npyio.py --> recfromcsv seems to have a bug and ignores any dtypes provided (Trac #2168) #5958

Open numpy-gitbot opened 11 years ago

numpy-gitbot commented 11 years ago

Original ticket http://projects.scipy.org/numpy/ticket/2168 on 2012-06-16 by trac user kobejohn, assigned to unknown.

I found this due to someone having a problem not being able to load large integers with recfromcsv. After playing with it, I think it is simply ignoring all the dtype information provided.

[https://github.com/numpy/numpy/blob/master/numpy/lib/npyio.py#L1859 Line 1859 in npyio.py, part of recfromcsv()] tries to either bring in the dtypes passed or set None. However, it actually brings in a kwarg that I couldn't find anywhere else called 'update' which looks suspiciously like a copied mistype from earlier in the line.

If I change 'update' --> 'dtype', then the types get picked up as expected.

I found this in the github repo (although I may have been looking at the wrong branch) as well as 1.6.2

numpy-gitbot commented 11 years ago

trac user kobejohn wrote on 2012-06-17

Please delete this ticket if possible. Someone notified me that the project is trying to work on github now so I posted this there. Sorry for the trouble.

https://github.com/numpy/numpy/issues/311