code: def test_uniform_grid():
      x = _create_uniform_grid_exclude_border(1, 2)
      assert_array_equal(x, [[1.0 / 3.0], [2.0 / 3.0]])
      x = _create_uniform_grid_include_border(1, 2)
      assert_array_equal(x, [[0.0], [1.0]])
      x = _create_uniform_grid_only_border(1, 2)
      assert_array_equal(x, [[0.0], [1.0]])
  
      x = _create_uniform_grid_exclude_border(1, 3)
      assert_array_equal(x, [[1.0 / 4.0], [2.0 / 4.0], [3.0 / 4.0]])
      x = _create_uniform_grid_include_border(1, 3)
      assert_array_equal(x, [[0.0 / 2.0], [1.0 / 2.0], [2.0 / 2.0]])
      x = _create_uniform_grid_only_border(1, 3)
      assert_array_equal(x, [[0.0 / 2.0], [1.0 / 2.0], [2.0 / 2.0]])
  
      x = _create_uniform_grid_exclude_border(1, 5)
      assert_array_equal(
          x,
          [
              [1.0 / 6.0],
              [2.0 / 6.0],
              [3.0 / 6.0],
              [4.0 / 6.0],
              [5.0 / 6.0],
          ],
      )
      x = _create_uniform_grid_include_border(1, 5)
      assert_array_equal(
          x,
          [
              [0.0 / 4.0],
              [1.0 / 4.0],
              [2.0 / 4.0],
              [3.0 / 4.0],
              [4.0 / 4.0],
          ],
      )
      x = _create_uniform_grid_only_border(1, 5)
      assert_array_equal(
          x,
          [
              [0.0 / 4.0],
              [1.0 / 4.0],
              [2.0 / 4.0],
              [3.0 / 4.0],
              [4.0 / 4.0],
          ],
      )
  
      x = _create_uniform_grid_exclude_border(2, 2)
      assert_array_equal(
          x,
          [
              [1.0 / 3.0, 1.0 / 3.0],
              [1.0 / 3.0, 2.0 / 3.0],
              [2.0 / 3.0, 1.0 / 3.0],
              [2.0 / 3.0, 2.0 / 3.0],
          ],
      )
      x = _create_uniform_grid_include_border(2, 2)
      assert_array_equal(
          x, [[0.0, 0.0], [0.0, 1.0], [1.0, 0.0], [1.0, 1.0]]
      )
      x = _create_uniform_grid_only_border(2, 3)
      assert_array_equal(
          x,
          [
              [0.0, 0.0],
              [0.0, 0.5],
              [0.0, 1.0],
              [1.0, 0.0],
              [1.0, 0.5],
              [1.0, 1.0],
          ],
      )
  
      assert_raises(
          AssertionError, _create_uniform_grid_exclude_border, 1, 0
      )
      assert_raises(
          AssertionError, _create_uniform_grid_exclude_border, 0, 1
      )
      assert_raises(
          AssertionError, _create_uniform_grid_include_border, 1, 0
      )
      assert_raises(
          AssertionError, _create_uniform_grid_include_border, 0, 1
      )
      assert_raises(
          AssertionError, _create_uniform_grid_only_border, 1, 1
      )
      assert_raises(
          AssertionError, _create_uniform_grid_only_border, 0, 2
      )
  
imports: import pytest
  import numbers
  import numpy
  import os
  import yaml
  from tempfile import NamedTemporaryFile
  from numpy.testing import assert_array_almost_equal
  from numpy.testing import assert_almost_equal
  from numpy.testing import assert_array_equal
  from numpy.testing import assert_equal
  from numpy.testing import assert_raises
  from scipy import spatial
  from skopt import Optimizer
  from skopt.space import Space
  from skopt.space import Real
  from skopt.space import Integer
  from skopt.space import Categorical
  from skopt.space import check_dimension
  from skopt.sampler.sobol import _bit_lo0, _bit_hi1
  from skopt.sampler.halton import _van_der_corput_samples, _create_primes
  from skopt.sampler import Hammersly, Halton, Lhs, Sobol, Grid
  from skopt.sampler import InitialPointGenerator
  from skopt.sampler.grid import _create_uniform_grid_include_border
  from skopt.sampler.grid import _create_uniform_grid_exclude_border
  from skopt.sampler.grid import _quadrature_combine
  from skopt.sampler.grid import _create_uniform_grid_only_border
  from skopt.utils import cook_initial_point_generator
label_desc: Use image node_id 14 for calling a global function with example usage: test_uniform_grid() without return types