diff --git a/caiman/source_extraction/cnmf/map_reduce.py b/caiman/source_extraction/cnmf/map_reduce.py index efe789e4f..178f3e74e 100644 --- a/caiman/source_extraction/cnmf/map_reduce.py +++ b/caiman/source_extraction/cnmf/map_reduce.py @@ -454,7 +454,7 @@ def run_CNMF_patches(file_name, shape, params, gnb=1, dview=None, YrA_tot *= nA[:, None] nB = np.ravel(np.sqrt(B_tot.power(2).sum(0))) B_tot /= nB - B_tot = np.array(B_tot, dtype=np.float32) + B_tot = B_tot.toarray().astype(np.float32) # B_tot = scipy.sparse.coo_matrix(B_tot) F_tot *= nB[:, None]