code: def circ_mean(alpha, w=None, axis=0):
      
      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))
docs: 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
  
      >>> from pingouin import circ_mean
      >>> alpha = [0.785, 1.570, 3.141, 0.839, 5.934]
      >>> circ_mean(alpha)
      1.012962445838065