reshape/resize don't seem to provide the functionality I'm looking for.
In the simplest case, I want to add two 1D arrays with different numbers of columns, but each represents the same period. For example, each array contains data for 1 hour. 1 array sampling rate is 15 minutes the other is 30 minutes.
array1 = numpy.array([4, 4, 4, 4]) # 4 samples per hour (every 15 minutes)
array2 = numpy.array([5, 5]) # 2 samples per hour (every 30 minutes)
The desired result is to "scale" array1 to the same size as array2 then add.
scaled_array1 = [8, 8] # array1 scaled now has 2 samples per hour
array3 = scaled_array1 + array2 # [13, 13]
Alternatively, scale array 2 to 4 samples per hour:
scaled_array2 = [2.5, 2.5, 2.5, 2.5]
array3 = array1 + scaled_array2 # [6.5, 6.5, 6.5, 6.5]
I could write a class to do this, but it seems there must be an existing function that would provide this functionality? I've read through all of the array manipulation routines in the NumPy docs, but none seem to fit.