Major speed improvement: Get rid of `ep_neighbor` function and create a copy of `image` casted as `np.float` outside the loop.