This temp array isn't needed: ``np.any(temp - xy.reshape((xy.shape[0], -1)))``