def smooth(array, index, amount):
sum = array[index]<EOL>count = <NUM_LIT:1.><EOL>for n in range(<NUM_LIT:1>, amount+<NUM_LIT:1>):<EOL><INDENT>if index+n >= len(array):<EOL><INDENT>break<EOL><DEDENT>sum   += array[index+n]<EOL>count += <NUM_LIT:1.><EOL><DEDENT>for n in range(<NUM_LIT:1>, amount+<NUM_LIT:1>):<EOL><INDENT>if index-n < <NUM_LIT:0>:<EOL><INDENT>break<EOL><DEDENT>sum   += array[index-n]<EOL>count += <NUM_LIT:1.><EOL><DEDENT>return(sum/count)<EOL>
Returns the average of the data at the specified index +/- amount