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

Adrian Altenhoff adrian.altenhoff at inf.ethz.ch
Tue Aug 26 15:05:55 EDT 2014


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 looks like a bug, the entire way of
> modifying i inside the loop appears a bit dangerous to me. I’ll have look if I can make this safer.
Thanks.
> 
> As long as your data don’t actually contain any missing values you might also simply use np.loadtxt.
Ok, wasn't aware of that function so far. I will try that!

Best wishes
Adrian



More information about the NumPy-Discussion mailing list