[Numpy-discussion] unpack argument in loadtxt/genfromtxt does not work as documented
Thu Oct 7 09:01:44 CDT 2010
On Thu, Oct 7, 2010 at 4:00 AM, Pierre GM <email@example.com> wrote:
> On Oct 7, 2010, at 4:48 AM, Chris Fonnesbeck wrote:
>> The documentation for loadtxt and genfromtxt state that the unpack
>> argument functions as follows:
>> If True, the returned array is transposed, so that arguments may be
>> unpacked using x, y, z = loadtxt(...).
> Provided that all the columns have the same dtype
Aha, I see. Unfortunately that detail is not in the docstrings. This
is a pretty fundamental limitation of the function, I think, since it
is rare that a multi-column table of data will be of the same type. I
wonder if it would be possible to allow an 'obj' type array that could
be transposed? The way it is now, you have a 1d array representing
what is fundamentally 2d information.
More information about the NumPy-Discussion