code: def fit_transform(self, X, y=None, init=None):
          
          X = check_array(X)
          if X.shape[0] == X.shape[1] and self.dissimilarity != "precomputed":
              warnings.warn("The MDS API has changed. ``fit`` now constructs an"
                            " dissimilarity matrix from data. To use a custom "
                            "dissimilarity matrix, set "
                            "``dissimilarity=precomputed``.")
  
          if self.dissimilarity == "precomputed":
              self.dissimilarity_matrix_ = X
          elif self.dissimilarity == "euclidean":
              self.dissimilarity_matrix_ = euclidean_distances(X)
          else:
              raise ValueError("Proximity must be 'precomputed' or 'euclidean'."
                               " Got %s instead" % str(self.dissimilarity))
  
          self.embedding_, self.stress_, self.n_iter_ = smacof_p(
              self.dissimilarity_matrix_, self.n_uq, metric=self.metric,
              n_components=self.n_components, init=init, n_init=self.n_init,
              n_jobs=self.n_jobs, max_iter=self.max_iter, verbose=self.verbose,
              eps=self.eps, random_state=self.random_state,
              return_n_iter=True)
  
          return self.embedding_
docs: Fit the data from X, and returns the embedded coordinates
  
          Parameters
          ----------
          X : array, shape=[n_samples, n_features], or [n_samples, n_samples] \
                  if dissimilarity='precomputed'
              Input data.
  
          init : {None or ndarray, shape (n_samples,)}, optional
              If None, randomly chooses the initial configuration
              if ndarray, initialize the SMACOF algorithm with this array.