Skip to content

Commit 786179f

Browse files
committed
check for n_pca=='auto'
1 parent 17e066a commit 786179f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphtools/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def _reduce_data(self):
232232
-------
233233
Reduced data matrix
234234
"""
235-
if self.n_pca is not None and self.n_pca < self.data.shape[1]:
235+
if self.n_pca is not None and (self.n_pca == 'auto' or self.n_pca < self.data.shape[1]):
236236
tasklogger.log_start("PCA")
237237
n_pca = self.data.shape[1] - 1 if self.n_pca == 'auto' else self.n_pca
238238
if sparse.issparse(self.data):

0 commit comments

Comments
 (0)