Skip to content

Error while using delta_t = 1 in get_onion_analysis #116

@SimoneMartino98

Description

@SimoneMartino98

Found this error while running the following:

import dynsight
import numpy as np
#%% Load array
tica_array = np.load("data/tica_10_1.npy")
print(tica_array.shape)
tica_insight = dynsight.trajectory.Insight(dataset=tica_array)
# %% Onion 2D analysis
dt_list, n_clust, env_0 = tica_insight.get_onion_analysis()

Error:

ValueError: Found array with 1 sample(s) (shape=(1, 2)) while a minimum of 2 is required by GaussianMixture.

After a little debugging, it seems the cause is the default delta_t_min: int = 1 in get_onion_analysis. I don't know if it is related to 2D Insights only (This was 2D).

At the moment, I solved using delta_t_min: int = 2

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions