code: def find_neighbours_on_hexagon_grid(grid, center, radius):
      """
      Marks neighbors on the hexagon grid around specified
      center within specified radius.
  
      Parameters
      ----------
      grid : 2d-arry
          Hexagon grid.
  
      center : tuple
          Coordinates of the center neuron on the grid.
          Should be a tuple with two integers: ``(x, y)``.
  
      radius : int
          Radius specifies what neurons, around the center, are neighbours.
  
      Returns
      -------
      2d-array
      """
      if radius == 0:
          grid[center] = 1
          return grid
  
      center_x, center_y = center
      pattern = generate_neighbours_pattern(radius)
  
      # We add zero padding in order to be able
      # insert full pattern into the matrix. It's
      # useful in case if we are not able to mark all
      # neighbours from the pattern for specific neuron.
      # For instance, in case when center = (0, 0) we
      # are not able to mark neurons on the left and top
      # sides of the pattern's center.
      grid = np.pad(grid, radius, mode="constant")
  
      if center_x % 2 == 1:
          # Since every even row shifted to the right
          # compare to the odd rows then odd rows shifted
          # to the left compare to the even rows.
          # It means that our pattern has to be reversed
          # for the even rows.
          pattern = pattern[:, ::-1]
  
      pattern_size = 2 * radius + 1
      x_range = slice(center_x, center_x + pattern_size)
      y_range = slice(center_y, center_y + pattern_size)
  
      grid[x_range, y_range] = pattern
  
      # removing padding
      return grid[radius:-radius, radius:-radius]
  
file_path: neupy/neupy/algorithms/competitive/neighbours.py
imports: from __future__ import division
  import numpy
  from neupy.core.docs import shared_docs
label_desc: Use image node_id 6 for calling a global function with example usage: find_neighbours_on_hexagon_grid(grid, center, radius) and returns: grid, grid