From 185780e0827c0d205777db25bdff4e2c3c15bdfd Mon Sep 17 00:00:00 2001 From: Dominik Date: Tue, 19 Nov 2024 00:25:30 -0800 Subject: [PATCH] Fix #39 again --- src/palantir/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/palantir/utils.py b/src/palantir/utils.py index 077926af..e5c556e0 100644 --- a/src/palantir/utils.py +++ b/src/palantir/utils.py @@ -729,6 +729,9 @@ def determine_multiscale_space( 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 + if n_eigs < 3: + # Fix for #39 + n_eigs = 3 # Scale the data use_eigs = list(range(1, n_eigs))