def simple_moving_average(data, period):
catch_errors.check_for_period_error(data, period)<EOL>with warnings.catch_warnings():<EOL><INDENT>warnings.simplefilter("<STR_LIT:ignore>", category=RuntimeWarning)<EOL>sma = [np.mean(data[idx-(period-<NUM_LIT:1>):idx+<NUM_LIT:1>]) for idx in range(<NUM_LIT:0>, len(data))]<EOL><DEDENT>sma = fill_for_noncomputable_vals(data, sma)<EOL>return sma<EOL>
Simple Moving Average.

Formula:
SUM(data / N)