I have data that consists of an array of times, with 10 data points each second, and an array of intensity values corresponding to each time. So, for an example let's say that I have:
times = np.arange(0,100,0.1)
intensities = np.random.rand(len(times))
I want to see what the data will look like if I use a longer averaging time, so I want to create some bins, of, say 1 second, 5 seconds, and 10 seconds and average the intensity values in those new bins. What is the best way to do this in numpy? (Or other python package, but I'm assuming numpy/scipy has something for me.) I could use a for loop, but I'm hoping there is a better way. Thanks!