code: def fit(self, X, y=None):
      
      X = self._prepare_inputs(X, ensure_min_samples=2)
      M = np.cov(X, rowvar = False)
      if M.ndim == 0:
        M = 1./M
      else:
        M = np.linalg.inv(M)
  
      self.transformer_ = transformer_from_metric(np.atleast_2d(M))
      return self
docs: X : data matrix, (n x d)
      y : unused