-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Milestone
Description
Description of issue
Hi!
Thank you very much for making this tool available!
I would like to let you know that I have faced an issue when working with data stored in tuples (tuples of arrays). According to the documentation, functions such as neuromaps.nulls.alexander_bloch
can deal with data
in format tuple
. However, I get the following error with the following code:
import numpy as np
x = np.arange(10242)
x.shape #(10242,)
rotated = nulls.alexander_bloch((x,x), atlas='fsaverage', density='10k',n_perm=3, seed=0)
Error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/project/pet_neurochemistry/enic/petparti/code/pet_parti/lib/python3.10/site-packages/neuromaps/nulls/nulls.py", line 145, in alexander_bloch
return load_data(data)[spins]
IndexError: index 18787 is out of bounds for axis 0 with size 10242
We were able to track the issue back to the function load_data
, which does not return the data in the expected format:
y = load_data((x, x))
>>> y.shape #(10242, 2)
We were able to find a work-around by doing this:
img_nii=np.hstack(img_nii)
But anyway we thought it would be nice to let you know.
Thanks again for the tool!
Best,
Eli
Code of Conduct
- I agree to follow the
neuromaps
Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels