def readFloatArray(filename):
"Return a floating-point array containing the data from file |filename|."
data = []
for line in TextFile(filename):
if line[0] != '#':
data.append(map(string.atof, string.split(line)))
a = Numeric.array(data)
if a.shape[0] == 1 or a.shape[1] == 1:
a = Numeric.ravel(a)
return a
评论列表
文章目录