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
          ),
      )
  
      x = [1.0, 2.2, 3.9, 8.1, 1.0]
      for func in funcs:
          y = func(x)
  
          _test_initialization(
              Gamma(y, y, inertia=0.0, frozen=False),
              y,
              "shapes",
              0.0,
              False,
              torch.float32,
          )
          _test_initialization(
              Gamma(y, y, inertia=0.3, frozen=False),
              y,
              "shapes",
              0.3,
              False,
              torch.float32,
          )
          _test_initialization(
              Gamma(y, y, inertia=1.0, frozen=True),
              y,
              "shapes",
              1.0,
              True,
              torch.float32,
          )
          _test_initialization(
              Gamma(y, y, inertia=1.0, frozen=False),
              y,
              "shapes",
              1.0,
              False,
              torch.float32,
          )
  
          _test_initialization(
              Gamma(y, y, inertia=0.0, frozen=False),
              y,
              "rates",
              0.0,
              False,
              torch.float32,
          )
          _test_initialization(
              Gamma(y, y, inertia=0.3, frozen=False),
              y,
              "rates",
              0.3,
              False,
              torch.float32,
          )
          _test_initialization(
              Gamma(y, y, inertia=1.0, frozen=True),
              y,
              "rates",
              1.0,
              True,
              torch.float32,
          )
          _test_initialization(
              Gamma(y, y, inertia=1.0, frozen=False),
              y,
              "rates",
              1.0,
              False,
              torch.float32,
          )
  
      y = numpy.array(x, dtype=numpy.float64)
  
      _test_initialization(
          Gamma(y, y, inertia=0.0, frozen=False),
          y,
          "shapes",
          0.0,
          False,
          torch.float64,
      )
      _test_initialization(
          Gamma(y, y, inertia=0.3, frozen=False),
          y,
          "shapes",
          0.3,
          False,
          torch.float64,
      )
      _test_initialization(
          Gamma(y, y, inertia=1.0, frozen=True),
          y,
          "shapes",
          1.0,
          True,
          torch.float64,
      )
      _test_initialization(
          Gamma(y, y, inertia=1.0, frozen=False),
          y,
          "shapes",
          1.0,
          False,
          torch.float64,
      )
  
      _test_initialization(
          Gamma(y, y, inertia=0.0, frozen=False),
          y,
          "rates",
          0.0,
          False,
          torch.float64,
      )
      _test_initialization(
          Gamma(y, y, inertia=0.3, frozen=False),
          y,
          "rates",
          0.3,
          False,
          torch.float64,
      )
      _test_initialization(
          Gamma(y, y, inertia=1.0, frozen=True),
          y,
          "rates",
          1.0,
          True,
          torch.float64,
      )
      _test_initialization(
          Gamma(y, y, inertia=1.0, frozen=False),
          y,
          "rates",
          1.0,
          False,
          torch.float64,
      )
  
imports: import os
  import numpy
  import torch
  import pytest
  from pomegranate.distributions import Gamma
  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 10 for calling a global function with example usage: test_initialization_float() without return types