我有这样的数组:
[[-3.75536609e+00 9.41899478e-01 1.59805989e+00 -8.97728577e-02
-3.67324662e+00 2.85971731e-01]
[-1.48593640e+00 6.56555116e-01 6.41966641e-01 -2.62360811e-01
-4.66498184e+00 -8.62938017e-02]
[ 7.05197873e-03 -4.12116805e-03 -1.30933505e-02 5.76611329e-03
-6.51661423e-04 -9.73143987e-03]
...
[ 7.28487849e-01 -2.02445209e-01 -1.56245055e-02 -1.48709917e+00
-4.94436502e+00 -1.88474905e+00]
[ 6.85976565e-01 -1.20424531e-01 -2.20480785e-01 -1.23380101e+00
-3.60452390e+00 -1.54651344e+00]
[ 1.47314686e-02 1.42228836e-02 -1.20135369e-02 -4.32784623e-03
-8.07471294e-03 2.29109559e-04]]
[-0.6025902 -0.31237862 -1.2150506 3.072987 -1.3560013 -1.0883616 ]
我希望能够将此数组写入文本文件。每个元素都应逐行打印。例如,第一个看起来像这样
-3.75536609e+00
9.41899478e-01
1.59805989e+00
-8.97728577e-02
-3.67324662e+00
2.85971731e-01
我该怎么做呢?
蝴蝶不菲
相关分类