参考:https://blog.csdn.net/qq_38497266/article/details/88871197

dets = np.array([[1,2],[3,4]])
np.savetxt("E:\workspace\dets.txt", dets,fmt='%f',delimiter=',')

保存:表示将dets数组保存到指定路径下的txt文件中,格式是浮点型,以逗号为分割符

保存的txt文件结果为:

python写txt-把矩阵数据写进txt文件

 

相关文章:

  • 2021-07-29
  • 2022-12-23
  • 2021-07-20
  • 2022-01-02
  • 2022-01-14
  • 2021-11-01
  • 2022-12-23
猜你喜欢
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2021-05-18
  • 2022-12-23
相关资源
相似解决方案