Christophe's suggestion for residuals,
    G[i] = Sqrt(Sum_j (x[j] - a[i,j])^2) - C[i]

def g(x,a,c):
    """
    Christophe's suggestion for residuals,
    G[i] = Sqrt(Sum_j (x[j] - a[i,j])^2) - C[i] 
    """
    return np.sqrt(((x-a)**2).sum(1)) - c