I have a list of n matrices where n = 5:
[matrix([[3.62425112, 0.00953506],
[0.00953506, 1.05054417]]), matrix([[4.15808905e+00, 9.27845937e-04],
[9.27845937e-04, 9.88509628e-01]]), matrix([[3.90560856, 0.0504297 ],
[0.0504297 , 0.92587046]]), matrix([[ 3.87347073, -0.12430547],
[-0.12430547, 1.09071475]]), matrix([[ 3.87697392, -0.00475038],
[-0.00475038, 1.01439917]])]
I want to do element-wise addition of these matrices:
I am trying this:
np.add(S_list[0], S_list[1], S_list[2], S_list[3], S_list[4])
It works but I don't want to fix n = 5
Can anyone please help? Thank you.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…