[Numpy-discussion] numpy.genfromtxt converters issue
Sat Nov 6 10:52:11 CDT 2010
In reply to my own question, the trivial, but massively inefficient solution
a1 = numpy.array(a.tolist())
But what I really want to do is have genfromtxt do the conversion for me.
Specifically, if I specify a dtype like:
then, ideally from my perspective, genfromtxt should coerce values to the
dtype choice (after the converter has done its work) and output a 2d array
or report an error. Instead it seems like whenever a converter is used,
dtype gets ignored and a 1d array of tuples is always returned.
More generally, it seems like the caller should have more control over what
genfromtxt returns, whether a 1d array of tuples or the 2d array of a
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion