code: def test_log_probability(X, mins, maxs):
      mins_, maxs_ = [1.3], [2.3]
      x = [[1.0], [2.0], [8.0], [3.7], [1.9]]
      y = [NEGINF, 0.0, NEGINF, NEGINF, 0.0]
  
      d1 = Uniform(mins_, maxs_)
      d2 = Uniform(
          numpy.array(mins_, dtype=numpy.float64),
          numpy.array(maxs_, dtype=numpy.float64),
      )
  
      _test_predictions(x, y, d1.log_probability(x), torch.float32)
      _test_predictions(x, y, d2.log_probability(x), torch.float64)
  
      x = [[1.0, 2.0, 1.5]]
      y = [-2.345645]
  
      d1 = Uniform(mins, maxs)
      d2 = Uniform(
          numpy.array(mins, dtype=numpy.float64),
          numpy.array(maxs, dtype=numpy.float64),
      )
  
      _test_predictions(x, y, d1.log_probability(x), torch.float32)
      _test_predictions(x, y, d2.log_probability(x), torch.float64)
  
      s, r = [0, 2, 4], [2, 4, 8]
      x = [[1, 3, 5], [1, 3, 4], [3, 5, 5], [2, 4, 1]]
      y = [-2.772589, -2.772589, NEGINF, NEGINF]
  
      d1 = Uniform(s, r)
      d2 = Uniform(
          numpy.array(s, dtype=numpy.int32),
          numpy.array(r, dtype=numpy.int32),
      )
  
      _test_predictions(x, y, d1.log_probability(x), torch.float32)
      _test_predictions(x, y, d2.log_probability(x), torch.float32)
  
      s, r = [0.0, 2.0, 4.0], [2.0, 4.0, 8.0]
      d1 = Uniform(s, r)
      d2 = Uniform(
          numpy.array(s, dtype=numpy.float64),
          numpy.array(r, dtype=numpy.float64),
      )
      _test_predictions(x, y, d1.log_probability(x), torch.float32)
      _test_predictions(x, y, d2.log_probability(x), torch.float64)
  
      y = [NEGINF, -2.345645, -2.345645, NEGINF, NEGINF, NEGINF, NEGINF]
  
      d1 = Uniform(mins, maxs)
      d2 = Uniform(
          numpy.array(mins, dtype=numpy.float64),
          numpy.array(maxs, dtype=numpy.float64),
      )
  
      _test_predictions(X, y, d1.log_probability(X), torch.float32)
      _test_predictions(X, y, d2.log_probability(X), torch.float64)
  
imports: import os
  import numpy
  import torch
  import pytest
  from pomegranate.distributions import Uniform
  from ._utils import _test_initialization_raises_two_parameters
  from ._utils import _test_initialization
  from ._utils import _test_predictions
  from ._utils import _test_efd_from_summaries
  from ._utils import _test_raises
  from nose.tools import assert_raises
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 16 for calling a global function with example usage: test_log_probability(X, mins, maxs) without return types