I've searched all over and read through the Postgresql array docs. Perhaps this is supported in postgres. I can get a down-sampled version of a numpy array like this:
numpy.array([1,2,3,4,5,6,7,8,9,0])[0:9:2] # the 2 here is the step size for the slice
out: array([1, 3, 5, 7, 9])
Can one do something similar for a postgresql array?
SELECT (ARRAY[1,2,3,4,5,6,7,8,9,10])[1:10:2]; // Don't forget 1 based indexing!
The above doesn't work. I'd expect this operation could be very fast in an array with elements of a fixed size.