Skip to content

Memory Error in group_binfile_parcellation #6

@mehrshadg

Description

@mehrshadg

Hey,

I am using this package to parcellate 60 fMRI data. When I run the group_binfile_parcellation script, I get Memory Error. My computer has 16 GB of RAM. I read the code and the line in which you are calculating:
W=W + csc_matrix((ones(len(sparse_i)),(sparse_i,sparse_j)), (n_voxels,n_voxels),dtype=double)
raises Memory Error after about 4 data are processed. So I changed it to
W+=csc_matrix((ones(len(sparse_i)),(sparse_i,sparse_j)), (n_voxels,n_voxels),dtype=double)
to prevent numpy from creating another array. But again the error occurred after 7 data.

Is there a way to workaround this issue? Somehow optimizing the code? I am not familiar with Python and its optimization techniques.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions