Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update_temporal_components() problem in main_cnmfe_e.ipynb cnm.fit() #18

Open
lyprince opened this issue Jul 25, 2018 · 0 comments
Open

Comments

@lyprince
Copy link

Rerunning main_cnmfe_e.ipynb after new pull and I run into the following error at cnm.fit(procs)


TypeError Traceback (most recent call last)
in ()
4
5 cnm = CNMFE(data, parameters['cnmfe'])
----> 6 cnm.fit(procs)

~/Downloads/miniscoPy/miniscopy/cnmf_e/cnmfe.py in fit(self, procs)
429 # 2. Fit for each patch by calling the class Patch
430 #################################################################################################
--> 431 self.fit_patch(procs)
432
433 #################################################################################################

~/Downloads/miniscoPy/miniscopy/cnmf_e/cnmfe.py in fit_patch(self, procs)
139 # fitting it
140 for i in tqdm(range(len(self.patch_index))):
--> 141 self.patch_object[i].fit(procs)
142 return
143

~/Downloads/miniscoPy/miniscopy/cnmf_e/cnmfe.py in fit(self, procs)
59 # 2. Initialize components / CALL greedyROI_corr in CAIMAN PACKAGE
60 #################################################################################################
---> 61 initialize_components(self, **self.parameters['init_params'])
62
63 #################################################################################################

~/Downloads/miniscoPy/miniscopy/cnmf_e/initialization.py in initialize_components(patch, gSig, gSiz, ssub, tsub, **kwargs)
764 kwargs_copy['ssub'] = ssub
765
--> 766 greedyROI_corr(patch, Yc, **kwargs_copy)
767
768 K = patch.A.shape[0] # number of neurons initialized

~/Downloads/miniscoPy/miniscopy/cnmf_e/initialization.py in greedyROI_corr(patch, Yc, tsub, ssub, ring_size_factor, **kwargs)
650 if nr:
651 # # Update temporal
--> 652 patch.C[...] = update_temporal_components(patch.B, patch.A, patch.C, **patch.parameters['temporal_params'])
653
654 # # Update spatial

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

~/anaconda2/envs/calcium/lib/python3.6/site-packages/h5py/_hl/dataset.py in setitem(self, args, val)
629 mshape_pad = mshape
630 mspace = h5s.create_simple(mshape_pad, (h5s.UNLIMITED,)*len(mshape_pad))
--> 631 for fspace in selection.broadcast(mshape):
632 self.id.write(mspace, fspace, val, mtype, dxpl=self._dxpl)
633

~/anaconda2/envs/calcium/lib/python3.6/site-packages/h5py/_hl/selections.py in broadcast(self, target_shape)
297 tshape.append(t)
298 else:
--> 299 raise TypeError("Can't broadcast %s -> %s" % (target_shape, count))
300 tshape.reverse()
301 tshape = tuple(tshape)

TypeError: Can't broadcast (2,) -> (1000, 4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant