From 366ae177f438172808a55077fef5b27e3836d411 Mon Sep 17 00:00:00 2001 From: EllaNguyen1711 Date: Tue, 14 Sep 2021 11:21:54 -0500 Subject: [PATCH] Change np.hstack to np.concatenate to allow loading trajectories of different shapes. --- enspara/msm/transition_matrices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enspara/msm/transition_matrices.py b/enspara/msm/transition_matrices.py index 19464233d..6c3de7c5e 100644 --- a/enspara/msm/transition_matrices.py +++ b/enspara/msm/transition_matrices.py @@ -163,7 +163,7 @@ def assigns_to_counts( assign, lag_time=lag_time, sliding_window=sliding_window) for assign in assigns] # generate sparse matrix - mat_coords = np.hstack(transitions) + mat_coords = np.concatenate(transitions, axis=1) mat_data = np.ones(mat_coords.shape[1], dtype=int) C = scipy.sparse.coo_matrix( (mat_data, mat_coords), shape=(max_n_states, max_n_states))