<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def z_angle_rotate(xy, theta):
 """ Rotated the input vector or set of vectors `xy` by the angle `theta`. Parameters xy : array_like The vector or array of vectors to transform. Must have shape """

    xy = np.array(xy).T
    theta = np.array(theta).T

    out = np.zeros_like(xy)
    out[...,0] = np.cos(theta)*xy[...,0] - np.sin(theta)*xy[...,1]
    out[...,1] = np.sin(theta)*xy[...,0] + np.cos(theta)*xy[...,1]

    return out.T