[Numpy-discussion] numpy loadtxt - ValueError: setting an array element with a sequence.

Bruce Southey bsouthey@gmail....
Thu Oct 29 08:22:34 CDT 2009

On 10/29/2009 07:30 AM, TheLonelyStar wrote:
>   Adter trying the same thing in matlab, I realized that my "tsv" file is not
> matrix-style. But this I mean, not all lines ave the same lenght (not the
> same number of values).
> What would be the best way to load this?
> Regards,
> Nathan
Really you have to find the reason why there are extra values in some 
rows compared to other rows. There have been some recent changes in 
numpy.genfromtxt that I would strong suggest using. It will indicate any 
problem rows that you can fix or just ignore.


More information about the NumPy-Discussion mailing list