我正在写一个特征选择码被附加。基本上得到从featureselection函数的输出,并将其级联到numpy的阵列数据空numpy的阵列向
data=np.zeros([1,4114]) # put feature length here
for i in range(1,N):
filename=splitpath+str(i)+'.tiff'
feature=featureselection(filename)
data=np.vstack((data, feature))
data=data[1:,:] # remove the first zeros row
然而,这不是一个健壮的实现,因为我需要知道特征长度(4114)预先。
是否有任何空numpy的阵列矩阵,就像在Python列表,我们有[]?