For the given 2d array of data, how to retrieve the position (index) of 7 and 11 in the bold.
Because only they are the elements surrounded by same value in the neighbours>
for i in range(1,np.shape(data)[0]-1):
for j in range(1,np.shape(data)[1]-1):
if np.all(data[i-1:i+2,j-1:j+2]==data[i,j]):
print np.array([i,j], dtype=np.int64)