[NumPy-Tickets] [NumPy] #1071: loadtxt fails if the last column contains empty value

NumPy Trac numpy-tickets@scipy....
Fri Apr 1 10:39:29 CDT 2011

#1071: loadtxt fails if the last column contains empty value
 Reporter:  Electrion            |       Owner:  somebody    
     Type:  defect               |      Status:  needs_review
 Priority:  normal               |   Milestone:  1.6.0       
Component:  numpy.lib            |     Version:  devel       
 Keywords:  loadtxt ascii strip  |  

Comment(by bsouthey):

 I forgot about Python3! So asbytes('\r\n') works for me.

 This is a '''great''' example that does not involve missing values because
 whitespace can be a valid entry in a string. Specifically that any non-
 delimiter character has to be treated as a valid value.

 Also, as you previously indicated, the numpy io test
 'test_dtype_with_object' is incorrect. The test relies on the ''unseen''
 end of line characters in triple-quotes of the data variable as can be
 seen by printing repr(data):

 '\n        1; 2001-01-01\n        2; 2002-01-31\n        '
 That means data variable really should be defined as (keeping the
         data = """1; 2001-01-01
         2; 2002-01-31 """
         #data = """1;2001-01-01\n2;2002-01-31""" # more explicitly

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

More information about the NumPy-Tickets mailing list