Re: [Numpy-discussion] Bug in genfromtxt with usecols and converters

2014-08-26 Thread Derek Homeier
Hi Adrian, I tried to load data from a csv file into numpy using genfromtxt. I need only a subset of the columns and want to apply some conversions to the data. attached is a minimal script showing the error. In brief, I want to load columns 1,2 and 4. But in the converter function for the

Re: [Numpy-discussion] Bug in genfromtxt with usecols and converters

2014-08-26 Thread Adrian Altenhoff
Hi Derek, thanks for your answer. not sure whether to call it a bug; the error seems to arise before reading any actual data (even on reading from an empty string); when genfromtxt is checking the filling_values used to substitute missing or invalid data it is apparently testing on default

Re: [Numpy-discussion] Bug in genfromtxt with usecols and converters

2014-08-26 Thread Derek Homeier
Hi Adrian, not sure whether to call it a bug; the error seems to arise before reading any actual data (even on reading from an empty string); when genfromtxt is checking the filling_values used to substitute missing or invalid data it is apparently testing on default testing values of 1

Re: [Numpy-discussion] Bug in genfromtxt with usecols and converters

2014-08-26 Thread Adrian Altenhoff
Hi Derek, But you are right that the problem with using the first_values, which should of course be valid, somehow stems from the use of usecols, it seems that in that loop for (i, conv) in user_converters.items(): i in user_converters and in usecols get out of sync. This certainly

[Numpy-discussion] Return item rather than scalar for user defined types

2014-08-26 Thread Anthony Scopatz
Hello All, Yesterday I opened PR #4889 https://github.com/numpy/numpy/pull/4998 to solve a problem I have been having w.r.t. xdress and Nathaniel asked me bring the issue up here. The PR itself is quite small (6 lines?) and is easy to review. The opening text of my PR is pasted below because I