Skip to content

array must not contain infs or NaNs #340

@KMIsenburg

Description

@KMIsenburg

Is your feature request related to a problem? Please describe.
I'm running nibetaseries on a group of 25 subjects, each with 4-6 runs at the participant level. It seems to work for most of the participants and most of the runs, and the output files look food. However, for several runs I get the same error in my crash files (will post an example below). The problem is that the error doesn't tell me which array contains NaNs. I double checked my regressor tsv files and can't find any na/a or NaNs in the columns that I've selected as confounds.

Traceback (most recent call last):
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 69, in run_node
result['result'] = node.run(updatehash=updatehash)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 473, in run
result = self._run_interface(execute=True)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 557, in _run_interface
return self._run_command(execute)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 637, in _run_command
result = self._interface.run(cwd=outdir)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 375, in run
runtime = self._run_interface(runtime)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nibetaseries/interfaces/nistats.py", line 90, in _run_interface
confounds=confounds)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nistats/first_level_model.py", line 441, in fit
confounds_names, self.min_onset)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nistats/design_matrix.py", line 411, in make_first_level_design_matrix
matrix, _ = full_rank(matrix)
File "/opt/miniconda-latest/lib/python3.7/site-packages/nistats/utils.py", line 256, in full_rank
U, s, V = spl.svd(X, full_matrices=False)
File "/opt/miniconda-latest/lib/python3.7/site-packages/scipy/linalg/decomp_svd.py", line 109, in svd
a1 = _asarray_validated(a, check_finite=check_finite)
File "/opt/miniconda-latest/lib/python3.7/site-packages/scipy/_lib/_util.py", line 239, in _asarray_validated
a = toarray(a)
File "/opt/miniconda-latest/lib/python3.7/site-packages/numpy/lib/function_base.py", line 496, in asarray_chkfinite
"array must not contain infs or NaNs")
ValueError: array must not contain infs or NaNs

Describe the solution you'd like
It would be helpful to know which file of mine is generating this error/

Describe alternatives you've considered
I've tried looking through the tsv files for the confound regressors because I assumed NaNs would be coming from here, but it doesn't seem like it is the issue unless 0s can also generate this error.

Thanks for your help :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions