def rotation_matrix(deg, axis='x'):
    rad = np.deg2rad(deg)
    (s, c) = (np.sin(rad), np.cos(rad))
    if (axis == 'x'):
        return np.array([1, 0, 0, 0, c, (- s), 0, s, c]).reshape((- 1), 3)
    elif (axis == 'y'):
        return np.array([c, 0, s, 0, 1, 0, (- s), 0, c]).reshape((- 1), 3)
    elif (axis == 'z'):
        return np.array([c, (- s), 0, s, c, 0, 0, 0, 1]).reshape((- 1), 3)
    else:
        return np.ones((3, 3))
def rotation_matrix(deg, axis='x'):
    rad = np.deg2rad(deg)
    (s, c) = (np.sin(rad), np.cos(rad))
    if (axis == 'x'):
        return np.array([1, 0, 0, 0, c, (- s), 0, s, c]).reshape((- 1), 3)
    elif (axis == 'y'):
        return np.array([c, 0, s, 0, 1, 0, (- s), 0, c]).reshape((- 1), 3)
    elif (axis == 'z'):
        return np.array([c, (- s), 0, s, c, 0, 0, 0, 1]).reshape((- 1), 3)
    else:
        return np.ones((3, 3))