Moving average script using NP