I have a set of 2D arrays that I wish to add up but they are of different lengths. I want it to add up such that they are centered on top of each other. For example for 1D:
a = [1,1,1,1,1]
b = [2,2,2]
therefore: c = [1,3,3,3,1]
I'm not sure how to approach this using numpy?
[1, 3, 3, 3, 1]if you're actually adding them. Can you clarify?