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

IndexError in demo_online_cnmfE.ipynb in cnm_online.fit_online() #1461

Open
ZaynZh opened this issue Feb 7, 2025 · 0 comments
Open

IndexError in demo_online_cnmfE.ipynb in cnm_online.fit_online() #1461

ZaynZh opened this issue Feb 7, 2025 · 0 comments

Comments

@ZaynZh
Copy link

ZaynZh commented Feb 7, 2025

- The Setup.

Operating system (Linux/macOS/Windows): Linux

Python version (3.x): 3.11.9

Working environment (Python IDE/Jupyter Notebook/other): Jupyter Notebook

Which of the demo scripts you're using for your analysis (if applicable): demo_online_cnmfE.ipynb

CaImAn version*: 1.11.3

CaImAn installation process (pip install ./pip install -e ./conda): conda

- Describe the issue that you are experiencing
Trying to run cnm_online.fit_online() with the images with shape (26213, 608, 608) and get IndexError: too many indices for array.

- Copy error log below
RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/user/anaconda3/envs/caiman/lib/python3.11/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "/home/user/anaconda3/envs/caiman/lib/python3.11/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
^^^^^^^^^^^^^^^^
File "/home/user/anaconda3/envs/caiman/lib/python3.11/site-packages/caiman/motion_correction.py", line 3044, in tile_and_correct_wrapper
imgs = imgs[(slice(None),) + indices]
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: too many indices for array: array is 2-dimensional, but 3 were indexed
"""

The above exception was the direct cause of the following exception:

IndexError Traceback (most recent call last)
Cell In[29], line 2
1 # run online estimator
----> 2 cnm_online.fit_online()

File ~/anaconda3/envs/caiman/lib/python3.11/site-packages/caiman/source_extraction/cnmf/online_cnmf.py:1152, in OnACID.fit_online(self, **kwargs)
...
772 return self._value
773 else:
--> 774 raise self._value

IndexError: too many indices for array: array is 2-dimensional, but 3 were indexed

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