2013-06-02 68 views

回答

1

使用的numpy.loadtxtndmin參數。將其設置爲1,並且您將始終有一個至少具有一個維度的數組。

2

使用ndmin=1

numpy.loadtxt(fobj, ndmin=1) 

得到一維數組。

相關問題