def _kernel_matrix(self, X, gamma):

        # Calculating the squared Euclidean distances for every pair of points
        # in the MxN dimensional dataset.
        sq_dists = distance.pdist(X, 'sqeuclidean')

        # Converting the pairwise distances into a symmetric MxM matrix.
        mat_sq_dists = distance.squareform(sq_dists)

        # Computing the MxM kernel matrix.
        K = np.exp((-1) * gamma * mat_sq_dists)

        # Centering the symmetric NxN kernel matrix.
        N = K.shape[0]
        one_n = np.ones((N, N)) / N
        K = one_n.dot(K) - K.dot(one_n) + one_n.dot(K).dot(one_n) - K
        return K
dataset/ETHPy150Open rasbt/mlxtend/mlxtend/feature_extraction/rbf_kernel_pca.py/RBFKernelPCA._kernel_matrix/swapped operands of `-`