[Numpy-discussion] genfromtxt universal newline support

Nathaniel Smith njs at pobox.com
Mon Jun 30 10:56:22 EDT 2014


On Mon, Jun 30, 2014 at 3:47 PM, Derek Homeier
<derek at astro.physik.uni-goettingen.de> wrote:
> Does it make sense to keep maintaing both functions at all? IIRC the idea that
> loadtxt would be the faster version of the two has been discarded long ago,
> thus it seems there is very little, if anything, loadtxt can do that cannot be done
> just as well by genfromtxt. Main compatibility issue is probably different default
> behaviour and interface of the two, but perhaps that might be best solved by
> replacing loadtxt with another genfromtxt wrapper?
> A real need, which had also been discussed at length, is a truly performant text IO
> function (i.e. one using a compiled ASCII number parser, and optimally also a more
> memory-efficient one), but unfortunately all people interested in implementing this
> seem to have drifted away (not excluding myself from this)…

It's possible we could steal some code from Pandas for this. IIRC they
have C/Cython text parsing routines. (It's also an interesting
question whether they've fixed the unicode/binary issues, might be
worth checking before rewriting from scratch...)

-- 
Nathaniel J. Smith
Postdoctoral researcher - Informatics - University of Edinburgh
http://vorpus.org



More information about the NumPy-Discussion mailing list