MouseLand / rastermap

a visualization method for neural data
GNU General Public License v3.0
193 stars 46 forks source link

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

Closed vncntprvst closed 1 year ago

vncntprvst commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

vncntprvst commented 1 year ago

Works great! Thank you