class_docstr: Test correlation.py.
  
  See the test_correlation.R file.
class_docstr_tok: ["Test","correlation.py",".","See","the","test_correlation.R","file","."]
docstr: Test function distance_corr
  We compare against the energy R package
docstr_tok: ["Test","function","distance_corr","We","compare","against","the","energy","R","package"]
code: def test_distance_corr(self):
      """Test function distance_corr
      We compare against the energy R package
      """
      a = [1, 2, 3, 4, 5]
      b = [1, 2, 9, 4, 4]
      dcor1 = distance_corr(a, b, n_boot=None)
      dcor, pval = distance_corr(a, b, seed=9)
      assert dcor1 == dcor
      assert np.round(dcor, 7) == 0.7626762
      assert 0.25 < pval < 0.40
      _, pval_low = distance_corr(a, b, seed=9, alternative="less")
      assert pval < pval_low
      # With 2D arrays
      np.random.seed(123)
      a = np.random.random((10, 10))
      b = np.random.random((10, 10))
      dcor, pval = distance_corr(a, b, n_boot=500, seed=9)
      assert np.round(dcor, 5) == 0.87996
      assert 0.20 < pval < 0.30
  
      with pytest.raises(ValueError):
          a[2, 4] = np.nan
          distance_corr(a, b)
  
file_path: pingouin/pingouin/tests/test_correlation.py
imports: import pytest
  import numpy
  from unittest import TestCase
  from pingouin.correlation import corr, rm_corr, partial_corr, skipped, distance_corr, bicor
  from pingouin import read_dataset
label_desc: Use image node_id 4 for calling the TestCorrelation obj's underlying member method code with example usage: obj.test_distance_corr() without return types