code: def test_float_type(
      float_test_data, float_alpha, float_beta, test_data, alpha, beta
  ):
      log_px_torch = (
          dist.Beta(float_alpha, float_beta)
          .log_prob(float_test_data)
          .data
      )
      assert isinstance(log_px_torch, torch.FloatTensor)
      log_px_val = log_px_torch.numpy()
      log_px_np = sp.beta.logpdf(
          test_data.detach().cpu().numpy(),
          alpha.detach().cpu().numpy(),
          beta.detach().cpu().numpy(),
      )
      assert_equal(log_px_val, log_px_np, prec=1e-4)
  
file_path: pyro/tests/distributions/test_tensor_type.py
imports: import pytest
  import scipy.stats
  import torch
  import pyro.distributions
  from tests.common import assert_equal
label_desc: Use image node_id 8 for calling a global function with example usage: test_float_type(float_test_data, float_alpha, float_beta, test_data, alpha, beta) without return types