code: def test_sofm_hexagon_grid_neighbours(self):
      # radius 1 (odd row index)
      expected_result = np.array(
          [
              [0, 0, 0, 0, 0],
              [0, 2, 2, 0, 0],
              [0, 2, 1, 2, 0],
              [0, 2, 2, 0, 0],
              [0, 0, 0, 0, 0],
          ]
      )
      actual_result = sofm.find_neighbours_on_hexagon_grid(
          grid=np.zeros((5, 5)), center=(2, 2), radius=1
      )
  
      np.testing.assert_array_almost_equal(
          expected_result, actual_result
      )
  
      # radius 1 (even row index)
      expected_result = np.array(
          [
              [0, 0, 2, 2, 0],
              [0, 2, 1, 2, 0],
              [0, 0, 2, 2, 0],
              [0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0],
          ]
      )
      actual_result = sofm.find_neighbours_on_hexagon_grid(
          grid=np.zeros((5, 5)), center=(1, 2), radius=1
      )
  
      np.testing.assert_array_almost_equal(
          expected_result, actual_result
      )
  
      # radius 1 (partialy broken)
      expected_result = np.array(
          [
              [1, 2, 0, 0, 0],
              [2, 0, 0, 0, 0],
              [0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0],
              [0, 0, 0, 0, 0],
          ]
      )
      actual_result = sofm.find_neighbours_on_hexagon_grid(
          grid=np.zeros((5, 5)), center=(0, 0), radius=1
      )
  
      np.testing.assert_array_almost_equal(
          expected_result, actual_result
      )
  
      # radius 2 (partialy broken)
      expected_result = np.array(
          [
              [0, 0, 0, 3, 2],
              [0, 0, 3, 2, 1],
              [0, 0, 0, 3, 2],
              [0, 0, 0, 3, 3],
              [0, 0, 0, 0, 0],
          ]
      )
      actual_result = sofm.find_neighbours_on_hexagon_grid(
          grid=np.zeros((5, 5)), center=(1, 4), radius=2
      )
  
      np.testing.assert_array_almost_equal(
          expected_result, actual_result
      )
  
      # radius 2
      expected_result = np.array(
          [
              [0, 3, 3, 3, 0],
              [3, 2, 2, 3, 0],
              [3, 2, 1, 2, 3],
              [3, 2, 2, 3, 0],
              [0, 3, 3, 3, 0],
          ]
      )
      actual_result = sofm.find_neighbours_on_hexagon_grid(
          grid=np.zeros((5, 5)), center=(2, 2), radius=2
      )
  
      np.testing.assert_array_almost_equal(
          expected_result, actual_result
      )
  
      # radius 3
      expected_result = np.array(
          [
              [0, 0, 4, 4, 4, 4, 0],
              [0, 4, 3, 3, 3, 4, 0],
              [0, 4, 3, 2, 2, 3, 4],
              [4, 3, 2, 1, 2, 3, 4],
              [0, 4, 3, 2, 2, 3, 4],
              [0, 4, 3, 3, 3, 4, 0],
              [0, 0, 4, 4, 4, 4, 0],
          ]
      )
      actual_result = sofm.find_neighbours_on_hexagon_grid(
          grid=np.zeros((7, 7)), center=(3, 3), radius=3
      )
  
      np.testing.assert_array_almost_equal(
          expected_result, actual_result
      )
  
imports: import math
  import numpy
  from neupy import algorithms
  from neupy.exceptions import WeightInitializationError
  from neupy.algorithms.competitive import sofm
  from neupy.algorithms.competitive.neighbours import gaussian_df
  from base import BaseTestCase
label_desc: Use image node_id 8 for calling the SOFMNeigboursTestCase obj's underlying member method code with example usage: obj.test_sofm_hexagon_grid_neighbours() without return types