[NumPy-Tickets] [NumPy] #1665: genfromtxt returns inconsistent output if column converters are used

NumPy Trac numpy-tickets@scipy....
Sat Nov 13 11:45:39 CST 2010


#1665: genfromtxt returns inconsistent output if column converters are used
--------------------+-------------------------------------------------------
 Reporter:  dmoore  |       Owner:  somebody      
     Type:  defect  |      Status:  needs_decision
 Priority:  normal  |   Milestone:  2.0.0         
Component:  Other   |     Version:  1.4.1         
 Keywords:          |  
--------------------+-------------------------------------------------------

Comment(by pierregm):

 Sorry, I should have picked a better word than "buggy". It remains that
 your converter is not fail-proof: what if one of your input is only 1
 character long (for whatever reason) ?

 In any case, I have to agree with you; the current behavior of genfromtxt
 with converters is a bit shady. I'm working as I'm writing that, following
 a suggestion from Luis on the mailing-list.

 For your last example: in that case, provided you define a converter
 date->integer, you could use a simple dtype=int to get what you want,
 without having to define N+2 converters. In that case, your converter
 would output an int, which would be compatible with the dtype.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1665#comment:3>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list