Skip to content

Commit

Permalink
check for n_pca=='auto'
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgigante committed Oct 12, 2019
1 parent 17e066a commit 786179f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphtools/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def _reduce_data(self):
-------
Reduced data matrix
"""
if self.n_pca is not None and self.n_pca < self.data.shape[1]:
if self.n_pca is not None and (self.n_pca == 'auto' or self.n_pca < self.data.shape[1]):
tasklogger.log_start("PCA")
n_pca = self.data.shape[1] - 1 if self.n_pca == 'auto' else self.n_pca
if sparse.issparse(self.data):
Expand Down

0 comments on commit 786179f

Please sign in to comment.