Efficient identification of adjacent elements in numpy matrix

Published --