我已经创建了函数,并试图使列表/函数在带有标题的文本文件中打开。每个功能/列表都应为一列。
我已将功能写入文本文件,但无法有效地将它们设置为列或“堆栈”,我也希望将其设置为5平方英尺。
python;
electronorbit= np.array(lithiumorbit (n,me))
muonorbit= np.array(lithiumorbit (n,mmuon))
wavelength= np.array(lithiumλ (n,me))
muonwavelength= np.array(lithiumλ (n,mmuon))
electronenergy= np.array(lithiumUn (n,me))
muonenergy= np.array(lithiumUn (n,mmuon))
electron2ground= np.array(Photonemit)
muon2ground= np.array(Muonemit)
table=np.vstack((N,electronorbit,muonorbit,wavelength,muonwavelength,electronenergy,muonenergy,electron2ground,muon2ground))
TT=open("bohr_Li_atom.txt",'w')
print(table,file=TT)
[[ 1.00000000e+00 2.00000000e+00 3.00000000e+00 4.00000000e+00
5.00000000e+00 6.00000000e+00 7.00000000e+00 8.00000000e+00
9.00000000e+00 1.00000000e+01 1.10000000e+01 1.20000000e+01
1.30000000e+01 1.40000000e+01 1.50000000e+01 1.60000000e+01
1.70000000e+01 1.80000000e+01 1.90000000e+01 2.00000000e+01]
[ 1.76383589e-11 7.05534355e-11 1.58745230e-10 2.82213742e-10
4.40958972e-10 6.34980919e-10 8.64279585e-10 1.12885497e-09
1.42870707e-09 1.76383589e-09 2.13424142e-09 2.53992368e-09
2.98088265e-09 3.45711834e-09 3.96863075e-09 4.51541987e-09
5.09748571e-09 5.71482828e-09 6.36744755e-09 7.05534355e-09]
[ 8.53049930e-14 3.41219972e-13 7.67744937e-13 1.36487989e-12
2.13262483e-12 3.07097975e-12 4.17994466e-12 5.45951956e-12
6.90970444e-12 8.53049930e-12 1.03219042e-11 1.22839190e-11
1.44165438e-11 1.67197786e-11 1.91936234e-11 2.18380782e-11
2.46531430e-11 2.76388177e-11 3.07951025e-11 3.41219972e-11]
[ 1.10825077e-10 2.21650155e-10 3.32475232e-10 4.43300309e-10
5.54125387e-10 6.64950464e-10 7.75775541e-10 8.86600619e-10
9.97425696e-10 1.10825077e-09 1.21907585e-09 1.32990093e-09
1.44072601e-09 1.55155108e-09 1.66237616e-09 1.77320124e-09
1.88402631e-09 1.99485139e-09 2.10567647e-09 2.21650155e-09]
[ 5.35987079e-13 1.07197416e-12 1.60796124e-12 2.14394832e-12
2.67993539e-12 3.21592247e-12 3.75190955e-12 4.28789663e-12
4.82388371e-12 5.35987079e-12 5.89585787e-12 6.43184495e-12
6.96783203e-12 7.50381911e-12 8.03980618e-12 8.57579326e-12
9.11178034e-12 9.64776742e-12 1.01837545e-11 1.07197416e-11]
[ 1.96208202e-17 4.90520504e-18 2.18009113e-18 1.22630126e-18
7.84832807e-19 5.45022783e-19 4.00424902e-19 3.06575315e-19
2.42232348e-19 1.96208202e-19 1.62155539e-19 1.36255696e-19
1.16099528e-19 1.00106225e-19 8.72036452e-20 7.66438288e-20
6.78921113e-20 6.05580870e-20 5.43513024e-20 4.90520504e-20]
[ 4.05696144e-15 1.01424036e-15 4.50773494e-16 2.53560090e-16
1.62278458e-16 1.12693373e-16 8.27951315e-17 6.33900226e-17
5.00859437e-17 4.05696144e-17 3.35286070e-17 2.81733434e-17
2.40056890e-17 2.06987829e-17 1.80309397e-17 1.58475056e-17
1.40379289e-17 1.25214859e-17 1.12381203e-17 1.01424036e-17]
[-1.22473160e+02 -3.06182899e+01 -1.36081288e+01 -7.65457247e+00
-4.89892638e+00 -3.40203221e+00 -2.49945224e+00 -1.91364312e+00
-1.51201432e+00 -1.22473160e+00 -1.01217487e+00 -8.50508053e-01
-7.24693252e-01 -6.24863059e-01 -5.44325154e-01 -4.78410780e-01
-4.23782559e-01 -3.78003579e-01 -3.39260830e-01 -3.06182899e-01]
[-2.53235533e+04 -6.33088833e+03 -2.81372815e+03 -1.58272208e+03
-1.01294213e+03 -7.03432037e+02 -5.16807211e+02 -3.95680521e+02
-3.12636461e+02 -2.53235533e+02 -2.09285565e+02 -1.75858009e+02
-1.49843511e+02 -1.29201803e+02 -1.12549126e+02 -9.89201302e+01
-8.76247520e+01 -7.81591152e+01 -7.01483472e+01 -6.33088833e+01]]
我得到这样的输出,但是我不确定,当我得到列时,如何给每个标题命名。