Compute the moving average of vector Z over a sliding window of size n.
Return a vector of length len(Z) - n + 1.
Input
Z = [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19]
n = 3
Output
[ 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18.]