code: def test_double_type(test_data, alpha, beta):
      log_px_torch = dist.Beta(alpha, beta).log_prob(test_data).data
      assert isinstance(log_px_torch, torch.DoubleTensor)
      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 7 for calling a global function with example usage: test_double_type(test_data, alpha, beta) without return types