python 两个npy档案合并


old_record=numpy.load('exist.npy')
temp_record=[]

path = os.getcwd()+"\\database\\new"    #获取当前路径
for root,dirs,files in os.walk(path):    #遍历统计
	for each in files:  
		url=path+"\\"+each
		...
		temp_record.append(temp)

numpy.save('temp.npy',temp_record) 
temp=numpy.load('temp.npy')

new_record=numpy.append(old_record,temp)
numpy.save('exist.npy',new_record) 

猜你喜欢

转载自blog.csdn.net/weixin_39874268/article/details/83109725