Skip to content

Commit

Permalink
fix array comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgigante committed Jun 30, 2018
1 parent 14a1973 commit e5e2d28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/magic/magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def transform(self, X=None, genes=None, t_max=20,
self.X_magic = X_magic

# return selected genes
if genes == "pca_only":
if isinstance(genes, str) and genes == "pca_only":
if sparse.issparse(self.graph.data):
X_magic = PCA().fit_transform(X_magic)
genes = ["PC{}".format(i + 1) for i in range(X_magic.shape[1])]
Expand Down

0 comments on commit e5e2d28

Please sign in to comment.