From 5ff5dc5b762fb0cf94117dd5a816c2e4fcc2469a Mon Sep 17 00:00:00 2001 From: Moritz Schaefer Date: Thu, 12 Aug 2021 01:39:49 +0200 Subject: [PATCH] fix indexing --- scikitplot/decomposition.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scikitplot/decomposition.py b/scikitplot/decomposition.py index 96e7d5f..c652a90 100644 --- a/scikitplot/decomposition.py +++ b/scikitplot/decomposition.py @@ -177,7 +177,7 @@ def plot_pca_2d_projection(clf, X, y, title='PCA 2-D Projection', alpha=0.8, lw=2, label=label, color=color) if label_dots: - for dot in transformed_X[y == label, np.array(dimensions)[:, np.newaxis]]: + for dot in transformed_X[y == label][dimensions]: ax.text(*dot, label) if biplot: