>>> for line in array0Lines:
... line= line.strip()
... listFromLine =line.split('\t')
... returnMat[0,:]= listFromLine[0:len(array0Lines)]
...
>>> returnMat
matrix([[ 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11,
1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11,
1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11,
1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11,
1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11,
1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11,
1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11,
1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11,
1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11,
1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11,
1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11, 1.11,
1.11, 1.11, 1.11, 1.11, 1.11, 1.11]])
>>> array0Lines
['1.21 \n', '1.15 \n', '1.04 \n', '1.12 \n', '1.03 \n', '1.06 \n', '1.00 \n', '0.95 \n', '0.94 \n', '0.95 \n', '0.87 \n', '0.92 \n', '0.93 \n', '0.97 \n', '0.92 \n', '0.88 \n', '0.85 \n', '0.85 \n', '0.94 \n', '0.97 \n', '0.93 \n', '0.92 \n', '0.84 \n', '0.91 \n', '0.89 \n', '0.91 \n', '0.82 \n', '0.96 \n', '0.85 \n', '0.88 \n', '0.87 \n', '0.90 \n', '0.87 \n', '0.90 \n', '0.85 \n', '0.84 \n', '0.75 \n', '0.77 \n', '0.71 \n', '0.74 \n', '0.75 \n', '0.72 \n', '0.82 \n', '0.75 \n', '0.77 \n', '0.79 \n', '0.79 \n', '0.77 \n', '0.79 \n', '0.72 \n', '0.81 \n', '0.80 \n', '0.80 \n', '0.74 \n', '0.80 \n', '0.72 \n', '0.75 \n', '0.71 \n', '0.75 \n', '0.91 \n', '0.89 \n', '0.86 \n', '0.84 \n', '0.81 \n', '0.80 \n', '0.72 \n', '0.70 \n', '0.67 \n', '0.68 \n', '0.75 \n', '0.71 \n', '0.66 \n', '0.66 \n', '0.67 \n', '0.73 \n', '0.88 \n', '0.96 \n', '1.10 \n', '1.09 \n', '1.10 \n', '1.11 \n', '1.18 \n', '1.10 \n', '1.16 \n', '1.22 \n', '1.03 \n', '1.16 \n', '1.14 \n', '1.12 \n', '1.18 \n', '1.10 \n', '1.24 \n', '1.03 \n', '0.87 \n', '0.92 \n', '0.83 \n', '0.93 \n', '1.00 \n', '0.99 \n', '0.91 \n', '0.95 \n', '1.00 \n', '1.16 \n', '1.08 \n', '1.11 ']
>>> listFromLine
['1.11']
添加回答
举报
0/150
提交
取消