x = np.array([[1],[1],[3]])
y = np.array([[1],[2]])
x+y
I have a few arrays I want to add together, they are structured like the above example. I want to add these arrays together, and where the dimension does not match up I want 0 added to that value. i.e. the result should be
array([[2],
[3],
[3]])
I do not know which of "x" or "y" will have higher dimension. Is there a nice way to deal with this? I've tried resizing the arrays to the maximum of the dimension between the two but no luck