Looking for module for shrinking a list with n-point means

Yash Ganthe yashgt at gmail.com
Fri May 22 06:03:50 EDT 2009


Hi,

I would like to shrink a large list in the following way:
If the List has 1000 integers, we need only 100 averages such that the
1000 points are average for every 10 consecutive values. So p0 to p9
will be averaged to obtain t0. p10 to p19 will be averaged to obtain
t1 and so on. This is a 10-point mean.

We are doing this as we collect a lot of data and plot it on a graph.
Too many samples makes the graph cluttered. So we need to reduce the
number of values in the way described above.

Does SciPy or NumPy or any other module have functions for achieving
this?

Which function can be used for doing this?

Thanks,
Yash



More information about the Python-list mailing list