[NumPy-Tickets] [NumPy] #1565: loadtxt fails to load large unsigned int64 integers.

NumPy Trac numpy-tickets@scipy....
Sat Apr 2 14:48:18 CDT 2011

#1565: loadtxt fails to load large unsigned int64 integers.
 Reporter:  rainwoodman  |       Owner:  somebody    
     Type:  defect       |      Status:  needs_review
 Priority:  normal       |   Milestone:  1.6.0       
Component:  Other        |     Version:  1.4.0       
 Keywords:               |  

Comment(by charris):

 Replying to [comment:10 rgommers]:
 > Probably went through float to avoid the error. There's likely to be
 some software out there that writes txt/csv files as "5, 300, 1e10" for
 integer data.  I agree raising an error may be better, but that will break
 backwards compatibility (perhaps quite severely).
 > +1 for raising a ValueError as discussed above for (u)int64, since
 that's already broken.
 > -0.5 for changing it for all ints.

 Note that the error can be avoided by doing something like
 int64(repr(int(float(x)))) as a fallback when a ValueError is raised, but
 the largest values can't be converted in this way as they don't fit in a

Ticket URL: <http://projects.scipy.org/numpy/ticket/1565#comment:13>
NumPy <http://projects.scipy.org/numpy>
My example project

More information about the NumPy-Tickets mailing list