code: def test_initialization_float():
      funcs = (
          lambda x: x,
          tuple,
          lambda x: numpy.array(x, dtype=numpy.float32),
          lambda x: torch.tensor(x, dtype=torch.float32),
          lambda x: torch.nn.Parameter(
              torch.tensor(x), requires_grad=False
          ),
      )
  
      mins = [1.0, 2.2, 3.9, 8.1, 1.0]
      maxs = [2.0, 3.2, 4.9, 9.1, 2.0]
      for func in funcs:
          mins_ = func(mins)
          maxs_ = func(maxs)
  
          _test_initialization(
              Uniform(mins_, maxs_, inertia=0.0, frozen=False),
              mins_,
              "mins",
              0.0,
              False,
              torch.float32,
          )
          _test_initialization(
              Uniform(mins_, maxs_, inertia=0.3, frozen=False),
              mins_,
              "mins",
              0.3,
              False,
              torch.float32,
          )
          _test_initialization(
              Uniform(mins_, maxs_, inertia=1.0, frozen=True),
              mins_,
              "mins",
              1.0,
              True,
              torch.float32,
          )
          _test_initialization(
              Uniform(mins_, maxs_, inertia=1.0, frozen=False),
              mins_,
              "mins",
              1.0,
              False,
              torch.float32,
          )
  
          _test_initialization(
              Uniform(mins_, maxs_, inertia=0.0, frozen=False),
              maxs_,
              "maxs",
              0.0,
              False,
              torch.float32,
          )
          _test_initialization(
              Uniform(mins_, maxs_, inertia=0.3, frozen=False),
              maxs_,
              "maxs",
              0.3,
              False,
              torch.float32,
          )
          _test_initialization(
              Uniform(mins_, maxs_, inertia=1.0, frozen=True),
              maxs_,
              "maxs",
              1.0,
              True,
              torch.float32,
          )
          _test_initialization(
              Uniform(mins_, maxs_, inertia=1.0, frozen=False),
              maxs_,
              "maxs",
              1.0,
              False,
              torch.float32,
          )
  
      mins_ = numpy.array(mins, dtype=numpy.float64)
      maxs_ = numpy.array(maxs, dtype=numpy.float64)
  
      _test_initialization(
          Uniform(mins_, maxs_, inertia=0.0, frozen=False),
          mins_,
          "mins",
          0.0,
          False,
          torch.float64,
      )
      _test_initialization(
          Uniform(mins_, maxs_, inertia=0.3, frozen=False),
          mins_,
          "mins",
          0.3,
          False,
          torch.float64,
      )
      _test_initialization(
          Uniform(mins_, maxs_, inertia=1.0, frozen=True),
          mins_,
          "mins",
          1.0,
          True,
          torch.float64,
      )
      _test_initialization(
          Uniform(mins_, maxs_, inertia=1.0, frozen=False),
          mins_,
          "mins",
          1.0,
          False,
          torch.float64,
      )
  
      _test_initialization(
          Uniform(mins_, maxs_, inertia=0.0, frozen=False),
          maxs_,
          "maxs",
          0.0,
          False,
          torch.float64,
      )
      _test_initialization(
          Uniform(mins_, maxs_, inertia=0.3, frozen=False),
          maxs_,
          "maxs",
          0.3,
          False,
          torch.float64,
      )
      _test_initialization(
          Uniform(mins_, maxs_, inertia=1.0, frozen=True),
          maxs_,
          "maxs",
          1.0,
          True,
          torch.float64,
      )
      _test_initialization(
          Uniform(mins_, maxs_, inertia=1.0, frozen=False),
          maxs_,
          "maxs",
          1.0,
          False,
          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 8 for calling a global function with example usage: test_initialization_float() without return types