2015-03-25 76 views

回答

3

它,因爲你設置unpack=True,解包調換你的陣列。

從numpy的文檔:

unpack : bool, optional 

If True, the returned array is transposed, so that arguments may be 
unpacked using x, y, z = loadtxt(...). When used with a record data-type, 
arrays are returned for each field. Default is False.` 

如果你把它設置爲false,它不會轉的陣列。

+0

謝謝!我也發現genfromtxt做同樣的事情。 – 2015-03-25 03:51:19