code: def find_neighbour_distance(grid, center):
      """
      Returns distance from the center into different directions
      per each dimension separately.
  
      Parameters
      ----------
      grid : array-like
         Array that contains grid of n-dimensional vectors.
  
      center : tuple
          Index of the main neuron for which function returns
          distance to neuron's neighbours.
  
      Returns
      -------
      list of n-dimensional vectors
      """
      if len(center) != grid.ndim:
          raise ValueError(
              "Cannot find center, because grid of neurons has {} dimensions "
              "and center has specified coordinates for {} dimensional grid"
              "".format(grid.ndim, len(center))
          )
  
      slices = []
      for dim_length, center_coord in zip(grid.shape, center):
          slices.append(slice(-center_coord, dim_length - center_coord))
  
      return np.ogrid[slices]
  
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 2 for calling a global function with example usage: find_neighbour_distance(grid, center) and returns: np