<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def R_rot_2d(th):
 """Return a 2-dimensional rotation matrix. Parameters th: array, shape (n, 1) Angles about which to rotate. Returns ------- R: array, shape (n, 2, 2) """

    s, = np.sin(th).T
    c, = np.cos(th).T
    R = np.empty((len(th), 2, 2), dtype=np.float)

    R[:, 0, 0] = c
    R[:, 0, 1] = -s

    R[:, 1, 0] = s
    R[:, 1, 1] = c

    return R