[Numpy-discussion] genloadtxt: dtype=None and unpack=True
Wed Feb 11 22:47:17 CST 2009
On Feb 11, 2009, at 11:38 PM, Ryan May wrote:
> I noticed that using dtype=None with a heterogeneous set of data,
> trying to use unpack=True to get the columns into separate arrays
> (instead of a structured array) doesn't work. I've attached a patch
> that, in the case of dtype=None, unpacks the fields in the final
> array into a list of separate arrays. Does this seem like a good
> idea to you?
Nope, as it breaks consistency: depending on some input parameters,
you either get an array or a list. I think it's better to leave it as
it is, maybe adding an extra line in the doc precising that
unpack=True doesn't do anything for structured arrays.
More information about the Numpy-discussion