d_h = np.sqrt(np.power(x[i] - x[h[j]], 2) +