<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def simple_moving_matrix(x, n=10):
 """ Create simple moving matrix. Parameters x : ndarray A numpy array n : integer The number of sample points used to make average Returns ------- ndarray A n x n numpy array which will be useful for calculating confidentail interval of simple moving average """

    if x.ndim > 1 and len(x[0]) > 1:
        x = np.average(x, axis=1)
    h = n / 2
    o = 0 if h * 2 == n else 1
    xx = []
    for i in range(h, len(x) - h):
        xx.append(x[i-h:i+h+o])
    return np.array(xx)