title: Compare neighbours boolean numpy array in grid
body: <p>I want to write a function which compares the 8 neighbours of a node in my grid. When minimum of 3 of the neighbours have the same value as the central node, we can define the node as happy. </p>
  
  <p>for example in this array the central node and value is 0, we see that it has 3 neighbours of 0, so the node is happy:</p>
  
  <pre><code> array([[ 1,  0,  1],
         [ 1,  0,  1],
         [-1,  0,  0]])
  </code></pre>
  
  <p>I expect an boolean output with <code>True</code> or <code>False</code>.</p>
  
  <p>Can I think of something like this or can I use easily numpy for this?</p>
  
  <pre><code>def nodehappiness(grid, i, j, drempel=3):
      if i,j =&gt; 3:
         node == True
  </code></pre>
  
  <p>Thanks in advance</p>