If I have two numpy arrays of different sizes, how can I superimpose them.
a = numpy([0, 10, 20, 30])
b = numpy([20, 30, 40, 50, 60, 70])
What is the cleanest way to add these two vectors to produce a new vector (20, 40, 60, 80, 60, 70)?
This is my generic question. For background, I am specifically applying a Green's transform function and need to superimpose the results for each time step in the evaulation unto the responses previously accumulated.
This could be what you are looking for
basically you copy the longer one and then add in-place the shorter one
If you know that
b
is higher dimension, then:is all you need.