Skip to content

Commit

Permalink
Multi-scale space has to be > 1D:
Browse files Browse the repository at this point in the history
  • Loading branch information
Manu Setty committed Feb 12, 2019
1 parent a5e567c commit 76d0b2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/palantir/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ def determine_multiscale_space(dm_res, n_eigs=None):
if n_eigs is None:
vals = np.ravel(dm_res['EigenValues'])
n_eigs = np.argsort(vals[:(len(vals) - 1)] - vals[1:])[-1] + 1
if n_eigs < 3:
n_eigs = np.argsort(vals[:(len(vals) - 1)] - vals[1:])[-2] + 1

# Scale the data
use_eigs = list(range(1, n_eigs))
Expand Down

0 comments on commit 76d0b2c

Please sign in to comment.