docs: def signedMDS(cdm, W=None):
      """ Find the set of points from a cdm.
      """
  
      N = cdm.shape[0]
  
      D_sym = (cdm - cdm.T)
      D_sym /= 2
  
      if W is None:
          x_est = np.mean(D_sym, axis=1)
          x_est -= np.min(x_est)
          return x_est
  
      W_sub = W[1:, 1:]
      sum_W = np.sum(W[1:, :], axis=1)
  
      #    A = np.eye(N, N-1, k=-1) - W_sub.astype(np.int) / sum_W[:, None]
      A = np.eye(N - 1) - W_sub.astype(np.int) / 1. / sum_W[:, None]
      d = (np.sum(D_sym[1:, :] * W[1:, :], axis=1) / 1. / sum_W)
  
      x_est = np.linalg.lstsq(A, d)[0]
      x_est = np.r_[[0], x_est]
      x_est -= np.min(x_est)
  
      return x_est, A, np.linalg.pinv(A)