Finding a zero crossing in a matrix
Here's concise method to get the coordinates of the zero-crossings that seems to work according to my tests :

def zcr(x, y):
    return x[numpy.diff(numpy.sign(y)) != 0]


Some simple test case :

&gt;&gt;&gt; zcr(numpy.array([0, 1, 2, 3, 4, 5, 6, 7]), [1, 2, 3, -1, -2, 3, 4, -4])
array([2, 4, 6])


This is 2d only, but I believe it is easy to adapt to more dimensions.