class_docstr: Test class for `BinaryPrecisionAtFixedRecall` metric.
class_docstr_tok: ["Test","class","for","`","BinaryPrecisionAtFixedRecall","`","metric","."]
docstr: Test that different types of `thresholds` argument lead to same result.
code: def test_binary_precision_at_fixed_recall_threshold_arg(
      self, inputs, min_recall
  ):
      """Test that different types of `thresholds` argument lead to same result."""
      preds, target = inputs
  
      for pred, true in zip(preds, target):
          pred = (
              torch.tensor(np.round(pred.numpy(), 1)) + 1e-6
          )  # rounding will simulate binning
          r1, _ = binary_precision_at_fixed_recall(
              pred, true, min_recall=min_recall, thresholds=None
          )
          r2, _ = binary_precision_at_fixed_recall(
              pred,
              true,
              min_recall=min_recall,
              thresholds=torch.linspace(0, 1, 100),
          )
          assert torch.allclose(r1, r2)
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from scipy.special import expit
  from scipy.special import softmax
  from sklearn.metrics import precision_recall_curve
  from torchmetrics.classification.precision_fixed_recall import BinaryPrecisionAtFixedRecall, MulticlassPrecisionAtFixedRecall, MultilabelPrecisionAtFixedRecall, PrecisionAtFixedRecall
  from torchmetrics.functional.classification.precision_fixed_recall import binary_precision_at_fixed_recall, multiclass_precision_at_fixed_recall, multilabel_precision_at_fixed_recall
  from torchmetrics.metric import Metric
  from unittests import NUM_CLASSES
  from unittests.classification.inputs import _binary_cases, _multiclass_cases, _multilabel_cases
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester, inject_ignore_index, remove_ignore_index
label_desc: Use image node_id 6 for calling the TestBinaryPrecisionAtFixedRecall obj's underlying member method code with example usage: obj.test_binary_precision_at_fixed_recall_threshold_arg(inputs, min_recall) without return types