From: Humufr <hu...@ya...> - 2005-01-27 16:46:19
|
Hi, I had a problem with the load function. I have a file with some data in two columns. I'm trying to use load: x,y=load('toto.dat') with toto something like: 1 3 3 4 5 6 I obtained the error message: ValueError: too many values to unpack I understanded why. It's because the array is not use by columns but by lines when you unpack the array from load to x and y so I don't have enough variable. To solve this problem I add the transpose function: x,y=transpose(load('toto.dat')) I don't know if I'm alone with this problem but if yes that will be a good idea to update the help of the function. Thanks, Nicolas |