2013-06-02 80 views

回答

1

使用的numpy.loadtxtndmin参数。将其设置为1,并且您将始终有一个至少具有一个维度的数组。

2

使用ndmin=1

numpy.loadtxt(fobj, ndmin=1) 

得到一维数组。

相关问题