class_docstr: Test multicomp.py.
docstr: Test function bonf
  Compare to the p.adjust R function.
code: def test_bonf(self):
      """Test function bonf
      Compare to the p.adjust R function.
      """
      reject, pval_corr = bonf(pvals)
      assert_array_equal(reject, [False, False, True, False, False])
      assert_array_almost_equal(pval_corr, [1, 0.6, 0.0005, 0.15, 0.7])
  
      # With NaN values
      _, pval_corr = bonf(pvals2_NA)
      assert_array_almost_equal(pval_corr, [1, np.nan, 0.4, 1.0, 0.56])
  
      # With 2D arrays
      _, pval_corr = bonf(pvals_2d)
      pval_corr = np.round(pval_corr.ravel(), 3)
      assert_array_almost_equal(
          pval_corr, [1, 1, 0.001, 0.27, 1, 1, np.nan, 0.9, 1.0, 1.0]
      )
  
file_path: pingouin/pingouin/tests/test_multicomp.py
imports: import pytest
  import numpy
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from unittest import TestCase
  from pingouin.multicomp import fdr, bonf, holm, sidak, multicomp
label_desc: Use image node_id 2 for calling the TestMulticomp obj's underlying member method code with example usage: obj.test_bonf() without return types