我有8个数据文件,每列和长度
file=glob.glob('*.txt')
x=0
plotnum=1
LL=[]
for f in file:
A=np.loadtxt(f, skiprows=2, usecols=[0]) #column with area data
L=np.loadtxt(f, skiprows=2, usecols=[1]) #column with length data
.......#code that plots subplots, calculates best fit lines, prints equations etc
LL.append(L)
plotnum+=1
x+=1
在循环的末尾,当我打印LL时,它会打印出一个数组列表。我需要计算所有数据的标准差,但在键入时会出现错误:
np.std(LL)
有没有办法把所有数组合并到一个列表中,这样我就可以计算标准差了?你知道吗
将单个列表合并为一个包含所有值的大列表
相关问题 更多 >
编程相关推荐