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

Error loading data: can only convert an array of size 1 to a Python scalar #19

Closed
vncntprvst opened this issue Aug 4, 2023 · 3 comments

Comments

@vncntprvst
Copy link

Hi,
I'm testing the latest version of rastermap (version 0.9.3 installed with pip install rastermap[gui] in a new environment).
When loading a spks.npy generated by Suite2P, from the rastermap GUI's menu, I'm getting this error:

Traceback (most recent call last):
  File "C:\Users\pseud\anaconda3\envs\rastermap\lib\site-packages\rastermap\gui\menus.py", line 20, in <lambda>
    loadMat.triggered.connect(lambda: io.load_mat(parent, name=None))
  File "C:\Users\pseud\anaconda3\envs\rastermap\lib\site-packages\rastermap\gui\io.py", line 71, in load_mat
    X, Usv, Vsv, xy = load_activity(parent.fname)
  File "C:\Users\pseud\anaconda3\envs\rastermap\lib\site-packages\rastermap\io.py", line 111, in load_activity
    if isinstance(X.item(), dict):
ValueError: can only convert an array of size 1 to a Python scalar

Is it an issue of backward compatibility with an Suite2P version? Or something else?
Thanks

@carsen-stringer
Copy link
Member

sorry about that, it was a bug, please pip install git+https://github.com/mouseland/rastermap.git, we will also make a new pip that will deploy soon (then you can pip install rastermap --upgrade)

@carsen-stringer
Copy link
Member

pip is now deployed (pip install rastermap --upgrade)

@vncntprvst
Copy link
Author

Works great! Thank you

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

2 participants