From c7d5df6b2c12c935505e7e54d38649897e2d13b3 Mon Sep 17 00:00:00 2001 From: Ethan Blackwood Date: Tue, 22 Oct 2024 00:01:05 -0400 Subject: [PATCH] Use F order when reshaping masks (#321) --- mesmerize_core/caiman_extensions/cnmf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesmerize_core/caiman_extensions/cnmf.py b/mesmerize_core/caiman_extensions/cnmf.py index 653ea9d..e1df330 100644 --- a/mesmerize_core/caiman_extensions/cnmf.py +++ b/mesmerize_core/caiman_extensions/cnmf.py @@ -227,7 +227,7 @@ def get_masks( masks = np.zeros(shape=(dims[0], dims[1], len(component_indices)), dtype=bool) for n, ix in enumerate(component_indices): - s = cnmf_obj.estimates.A[:, ix].toarray().reshape(cnmf_obj.dims) + s = cnmf_obj.estimates.A[:, ix].toarray().reshape(cnmf_obj.dims, order='F') s[s >= threshold] = 1 s[s < threshold] = 0