features = [1,2,3,4]
retDataSet=[]
reducedFeatVec=features[:0]    
print(reducedFeatVec)
reducedFeatVec.extend(features[1:])   #从1开始往 后加进来
print(reducedFeatVec)
retDataSet.append(reducedFeatVec) #变为向量
print(retDataSet)

python之featVec[:axis]|extend|append

 

相关文章:

  • 2021-06-24
  • 2021-11-29
  • 2021-11-29
  • 2021-11-23
  • 2021-07-18
  • 2021-11-29
  • 2021-11-29
  • 2021-11-29
猜你喜欢
  • 2021-07-04
  • 2021-11-27
  • 2021-11-29
  • 2021-10-31
  • 2022-01-20
  • 2022-12-23
  • 2021-11-29
相关资源
相似解决方案