title: Grouping coordinates of zero values in a 2D numpy array into lists based on their position in the matrix
body: <p>Excluding the boundary zero values, is it possible to group the coordinates (as tuples) of remaining zero values into different lists in this numpy array?</p>
  
  <pre><code>[[ 0  0  0  0  0  0  0  0  0  0  0]
   [ 0  1  1  1  0  0  0  1 10  2  0]
   [ 0  2 10  2  1  0  0  1  2 10  0]
   [ 0 10  3 10  1  0  0  0  1  1  0]
   [ 0  1  2  1  1  0  0  0  0  0  0]
   [ 0  1  2  1  2  2  2  1  0  0  0]
   [ 0 10  2 10  2 10 10  1  0  0  0]
   [ 0  1  2  1  2  2  2  1  1  1  0]
   [ 0  0  0  0  0  0  0  0  1 10  0]
   [ 0  0  0  0  0  0  0  0  1  1  0]
   [ 0  0  0  0  0  0  0  0  0  0  0]]
  </code></pre>
  
  <p>for ex. in above grid, there are two 'groups' of zeros, one in lower left corner and other in upper right corner. can these be put into separate lists, for every such matrix generated? Below is the code for creating matrix 'sol_mat' :-</p>
  
  <pre><code>import numpy as np
  import random
  
  bomb_mat = np.zeros((11,11), dtype = int)
  for i in range(10):
      a = random.randint(1,9)
      b = random.randint(1,9)
      bomb_mat[a,b] = 1
  
  sol_mat = np.zeros(11,11), dtype = int)
  for j in range(1,10):
      for k in range(1,y-1):
          if bomb_mat[j,k] == 1:
              sol_mat[j,k] = 10
          else:
              sol_mat[j,k] = bomb_mat[j-1,k-1] + bomb_mat[j,k-1] + bomb_mat[j+1,k-1]+ bomb_mat[j-1,k] + bomb_mat[j+1,k] + bomb_mat[j-1,k+1] + bomb_mat[j,k+1] + bomb_mat[j+1,k+1]
  </code></pre>
  
  <p><em>Trying to create minesweeper</em></p>