class_docstr: Test class for `PearsonCorrCoef` metric.
class_docstr_tok: ["Test","class","for","`","PearsonCorrCoef","`","metric","."]
docstr: Test class implementation of metric.
docstr_tok: ["Test","class","implementation","of","metric","."]
code: def test_pearson_corrcoef(self, preds, target, compute_on_cpu, ddp):
      """Test class implementation of metric."""
      num_outputs = EXTRA_DIM if preds.ndim == 3 else 1
      self.run_class_metric_test(
          ddp=ddp,
          preds=preds,
          target=target,
          metric_class=PearsonCorrCoef,
          reference_metric=_scipy_pearson,
          metric_args={
              "num_outputs": num_outputs,
              "compute_on_cpu": compute_on_cpu,
          },
      )
  
imports: from functools import partial
  import pytest
  import torch
  from scipy.stats import pearsonr
  from torchmetrics.functional.regression.pearson import pearson_corrcoef
  from torchmetrics.regression.pearson import PearsonCorrCoef, _final_aggregation
  from unittests import BATCH_SIZE, EXTRA_DIM, NUM_BATCHES, _Input
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 1 for calling the TestPearsonCorrCoef obj's underlying member method code with example usage: obj.test_pearson_corrcoef(preds, target, compute_on_cpu, ddp) without return types