code: def fit(self, X=None, u=None):
          
          X = X.copy()
          if self.mode is 'parallel':
              Xall = X.copy()
              X = np.reshape(Xall.copy(), (-1, Xall.shape[-1]))
          #X -= X.mean(axis=-1)[:,np.newaxis]
          if ((u is None)):
              nmin = min([X.shape[0], X.shape[1]])
              nmin = np.minimum(nmin-1, self.nPC)
              u,sv,v = svdecon(np.float64(X), k=nmin)
              u = u * sv
          NN, self.nPC = u.shape
          self.u = u
          # now sort in X
          U = self._map(u.copy(), self.n_components, self.n_X, u.copy())
          return self
docs: Fit X into an embedded space.
          Inputs
          ----------
          X : array, shape (n_samples, n_features)
          u,s,v : svd decomposition of X (optional)
  
          Assigns
          ----------
          embedding : array-like, shape (n_samples, n_components)
              Stores the embedding vectors.
          u,sv,v : singular value decomposition of data S, potentially with smoothing
          isort1 : sorting along first dimension of matrix
          isort2 : sorting along second dimension of matrix (if n_Y > 0)
          cmap: correlation of each item with all locations in the embedding map (before upsampling)
          A:    PC coefficients of each Fourier mode