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 to loop over subject_ids when only one patient in the subject_ids text file #3

Open
mathrip opened this issue Sep 28, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mathrip
Copy link

mathrip commented Sep 28, 2020

When only one patient in the subject_ids text file, np.loadtext function will squeeze the mono-dimensional axes, leading to an error when looping over subject_ids: "iteration over a 0-d array"
We need to specify the minimum dimension of outputs to avoid this problem

Suggested correction :
subject_ids=np.loadtxt(subject_dir+subject_ids_filename, dtype='str', ndmin = 1)

subject_ids=np.loadtxt(subject_dir+subject_ids_filename, dtype='str')

@mathrip mathrip added the bug Something isn't working label Sep 28, 2020
@mathrip mathrip self-assigned this Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant