I want to add the
distances
[array([2.0786226e-03, 3.9023757e-03, 3.4480095e-03, 5.1999092e-04], dtype=float32), array([0.0031136 , 0.00344056, 0.00739563, 0.0311079 ],
dtype=float32), array([1.8880665e-03, 3.0295253e-03, 4.0802956e-03, 2.6324868e-02], dtype=float32), array([0.00330418, 0.00431347, 0.00802791, 0.00426304],
dtype=float32)]
Desired Output
[0.00994899872, 0.04505769, 0.0353227554, 0.0199086]
I tried the following but it adds all the elements and gives on scalar value
print(sum( sum(x) if isinstance(x, list) else x for x in L ))
sumto do?