<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def circ_mean(alpha, w=None, axis=0):
 """Mean direction for circular data. Parameters alpha : array Sample of angles in radians w : array Number of incidences in case of binned angle data axis : int Compute along this dimension Returns ------- mu : float Mean direction Examples -------- Mean resultant vector of circular data 1.012962445838065 """

    alpha = np.array(alpha)
    if isinstance(w, (list, np.ndarray)):
        w = np.array(w)
        if alpha.shape != w.shape:
            raise ValueError("w must have the same shape as alpha.")
    else:
        w = np.ones_like(alpha)
    return np.angle(np.multiply(w, np.exp(1j * alpha)).sum(axis=axis))