title: Nearest elements in mltidimensional lattice
body: <p>I've got a numpy array akin to this one</p>
  
  <pre><code>  [[1, 1, 1, 1, 1],
     [1, 1, 1, 0, 1],
     [1, 1, 1, 1, 1],
     [1, 1, 1, 1, 1],
     [1, 1, 1, 1, 1]]
  </code></pre>
  
  <p>and I'd like to select a + sign around a specific element to do some computations on. So if, for example, i select array[1,2], I want to return a list with 3 ones and 1 zero. If I select array[0,3], I want to return 2 ones and 1 zero. </p>
  
  <p>I've run in to this problem before and aside from hardcoding something crazy, I figured I'd ask if there was a ready made function that has this functionality. </p>
  
  <p>In clearer language, if I select element array[x1, x2, x3, ..., xn] I'm looking for a function that takes the input [x1, x2, ..., xn] and outputs all direct neighbours.</p>