class_docstr: Test class for `BinaryPrecisionRecallCurve` metric.
class_docstr_tok: ["Test","class","for","`","BinaryPrecisionRecallCurve","`","metric","."]
docstr: Test that error are raised on wrong dtype.
docstr_tok: ["Test","that","error","are","raised","on","wrong","dtype","."]
code: def test_binary_error_on_wrong_dtypes(self, inputs):
      """Test that error are raised on wrong dtype."""
      preds, target = inputs
  
      with pytest.raises(
          ValueError,
          match="Expected argument `target` to be an int or long tensor with ground.*",
      ):
          binary_precision_recall_curve(
              preds[0], target[0].to(torch.float32)
          )
  
      with pytest.raises(
          ValueError,
          match="Expected argument `preds` to be an floating tensor with probability.*",
      ):
          binary_precision_recall_curve(preds[0].long(), target[0])
  
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_recall_curve import BinaryPrecisionRecallCurve, MulticlassPrecisionRecallCurve, MultilabelPrecisionRecallCurve, PrecisionRecallCurve
  from torchmetrics.functional.classification.precision_recall_curve import binary_precision_recall_curve, multiclass_precision_recall_curve, multilabel_precision_recall_curve
  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 7 for calling the TestBinaryPrecisionRecallCurve obj's underlying member method code with example usage: obj.test_binary_error_on_wrong_dtypes(inputs) without return types