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

🐛 TypeError: cannot perform reduce with flexible type #6

Open
shnizzedy opened this issue Apr 7, 2020 · 2 comments
Open

🐛 TypeError: cannot perform reduce with flexible type #6

shnizzedy opened this issue Apr 7, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@shnizzedy
Copy link
Owner

Traceback (most recent call last):
  File "cpac_correlations_wf.py", line 861, in <module>
    main()
  File "cpac_correlations_wf.py", line 849, in main
    quick_summary(corr_map_dict, output_dir)
  File "cpac_correlations_wf.py", line 585, in quick_summary
    lines.append("{0}: {1}".format(output_type, np.mean(np.asarray(corr_vec))))
  File "/usr/local/bin/miniconda/envs/py2.7/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 3118, in mean
    out=out, **kwargs)
  File "/usr/local/bin/miniconda/envs/py2.7/lib/python2.7/site-packages/numpy/core/_methods.py", line 75, in _mean
    ret = umr_sum(arr, axis, dtype, out, keepdims)
TypeError: cannot perform reduce with flexible type
@shnizzedy shnizzedy added the bug Something isn't working label Apr 7, 2020
@shnizzedy shnizzedy self-assigned this Apr 7, 2020
@shnizzedy
Copy link
Owner Author

looking into contents of corr_vec

@shnizzedy
Copy link
Owner Author

Somewhere strings (filepaths) are being expected as lists. Here's the contents of one corr_vec:

['/', 'm', 'e', 'd', 'i', 'a', '/', 'e', 'b', 's', '/', 'r', 'u', 'n', 's', '/', 'v', '1', '6', '1', '_', 'f', 'm', 'r', 'i', 'p', 'r', 'e', 'p', '_', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'd', 'a', 't', 'a', '_', 'f', 'm', 'r', 'i', 'p', 'r', 'e', 'p', '-', 'o', 'p', 't', 'i', 'o', 'n', 's', '/', 'w', 'o', 'r', 'k', 'i', 'n', 'g', '/', 'r', 'e', 's', 't', 'i', 'n', 'g', '_', 'p', 'r', 'e', 'p', 'r', 'o', 'c', '_', '0', '0', '2', '7', '0', '3', '7', '_', '1', '/', 'n', 'u', 'i', 's', 'a', 'n', 'c', 'e', '_', 'r', 'e', 'g', 'r', 'e', 's', 's', 'o', 'r', '_', '0', '_', '0', '/', 't', 'c', 'o', 'm', 'p', 'c', 'o', 'r', '/', '_', 's', 'c', 'a', 'n', '_', 'r', 'e', 's', 't', '_', 'r', 'u', 'n', '-', '1', '/', '_', 's', 'e', 'l', 'e', 'c', 't', 'o', 'r', '_', 'W', 'M', '-', '2', 'm', 'm', '-', 'M', '_', 'C', 'S', 'F', '-', '2', 'm', 'm', '-', 'M', '_', 't', 'C', '-', '5', 'P', 'C', 'T', '2', '-', 'P', 'C', '5', '_', 'a', 'C', '-', 'C', 'S', 'F', '+', 'W', 'M', '-', '2', 'm', 'm', '-', 'P', 'C', '5', '_', 'G', '-', 'M', '_', 'M', '-', 'S', 'D', 'B', '_', 'P', '-', '2', '_', 'B', 'P', '-', 'B', '0', '.', '0', '1', '-', 'T', '0', '.', '1', '/', 'm', 'e', 'r', 'g', 'e', '_', 's', 'l', 'i', 'c', 'e', '_', 'm', 'a', 's', 'k', 's', '/', 'c', 'o', 'm', 'm', 'a', 'n', 'd', '.', 't', 'x', 't']

Probably related, getting a lot of warnings like this:

added- file reading problem: Cannot work out file type of "/media/ebs/runs/v161_fmriprep_default_data_fmriprep-options/working/resting_preproc_NDARAA948VFH_ses-1/nuisance_regressor_0_0/_scan_peer_run-2/_selector_WM-2mm-M_CSF-2mm-M_tC-5PCT2-PC5_aC-CSF+WM-2mm-PC5_G-M_M-SDB_P-2_BP-B0.01-T0.1/aCompCor_union_masks/command.txt":/media/ebs/runs/v161_fmriprep_default_data_fmriprep-options/working/resting_preproc_NDARAA948VFH_ses-1/nuisance_regressor_0_0/_scan_peer_run-2/_selector_WM-2mm-M_CSF-2mm-M_tC-5PCT2-PC5_aC-CSF+WM-2mm-PC5_G-M_M-SDB_P-2_BP-B0.01-T0.1/aCompCor_union_masks/command.txt

shnizzedy pushed a commit that referenced this issue Oct 11, 2024
Vectorize correlation computation
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