def _fit(self, X):
        """Dispatch to the right submethod depending on the chosen solver."""
        X = check_array(X, dtype=[np.float64], ensure_2d=True,
                        copy=self.copy)

        # Handle n_components==None
        if self.n_components is None:
            n_components = X.shape[1]
        else:
            n_components = self.n_components

        # Handle svd_solver
        svd_solver = self.svd_solver
        if svd_solver == 'auto':
            # Small problem, just call full PCA
            if max(X.shape) <= 500:
                svd_solver = 'full'
            elif n_components >= 1 and n_components < .8 * min(X.shape):
                svd_solver = 'randomized'
            # This is also the case of n_components in (0,1)
            else:
                svd_solver = 'full'

        # Call different fits for either full or truncated SVD
        if svd_solver == 'full':
            return self._fit_full(X, n_components)
        elif ['arpack', 'randomized'] in svd_solver:
            return self._fit_truncated(X, n_components, svd_solver)
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/decomposition/pca.py/PCA._fit/swapped operands of `in`