class_docstr: Test circular.py.
class_docstr_tok: ["Test","circular.py","."]
docstr: Test function circ_mean.
docstr_tok: ["Test","function","circ_mean","."]
code: def test_circ_mean(self):
      """Test function circ_mean."""
      x = [0.785, 1.570, 3.141, 0.839, 5.934]
      x_nan = np.array([0.785, 1.570, 3.141, 0.839, 5.934, np.nan])
      # Compare with the CircStats MATLAB toolbox
      assert np.round(circ_mean(x), 3) == 1.013
      assert np.round(circ_mean(x_nan), 3) == 1.013
      # Binned data
      np.random.seed(123)
      nbins = 18  # Number of bins to divide the unit circle
      angles_bins = np.linspace(-np.pi, np.pi, nbins)
      # w represents the number of incidences per bins, or "weights".
      w = np.random.randint(low=0, high=5, size=angles_bins.size)
      assert round(circ_mean(angles_bins, w), 4) == -2.5355
  
file_path: pingouin/pingouin/tests/test_circular.py
imports: import pytest
  import numpy
  from unittest import TestCase
  from scipy.stats import circmean
  from pingouin import read_dataset
  from pingouin.circular import convert_angles, _checkangles
  from pingouin.circular import circ_axial, circ_corrcc, circ_corrcl, circ_mean, circ_r, circ_rayleigh, circ_vtest
label_desc: Use image node_id 5 for calling the TestCircular obj's underlying member method code with example usage: obj.test_circ_mean() without return types