taux_with_orthese=[]
with open('tau_mannequin_1432139027.txt') as f:
for line in f.readlines():
taux_with_orthese.append(map(float,line.replace("\n","").split(",")))
taux_with_orthese = np.array(taux_with_orthese)
tau_norm_instant = []
print tau_norm_instant
for i in range(0,len(taux_with_orthese)-1):
tau_norm_instant = np.array([np.sqrt((taux_with_orthese[i][28])**2 + (taux_with_orthese[i][29])**2 +(taux_with_orthese[i][30])**2 + (taux_with_orthese[i][31])**2 + (taux_with_orthese[i][32])**2 + (taux_with_orthese[i][33])**2+
(taux_with_orthese[i][34])**2)])
print tau_norm_instant
程序这么写完之后 只出现一列数
,我想求这一列数的和 怎么求呢?试过 tau_norm_instant = sum(
np.array([np.sqrt((taux_with_orthese[i][28])**2 + (taux_with_orthese[i][29])**2 +
(taux_with_orthese[i][30])**2 + (taux_with_orthese[i][31])**2 + (taux_with_orthese[i][32])**2 + (taux_with_orthese[i][33])**2 +(taux_with_orthese[i][34])**2)])),但是不好使啊...
谢谢!最后一个就是我要求的值。但是我怎么能提取出来呢...因为还要做别的计算