I am trying to add an array of (174, 2, 2) to itself vertically. So far I am able to do it in non-numpy way:
import numpy as np
cm1 = np.random.rand(174, 2, 2)
temp_array = np.zeros([2, 2])
for _content in cm1:
temp_array = np.add(temp_array, _content)
print(temp_array)
I am able to get the results, but is there a numpy way of doing this?