From ac1e2d1faae86590972bf37371f47821bdd15926 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Mon, 22 Aug 2022 11:32:07 -0400 Subject: [PATCH] TEST: Coerce close_up_to_column_sign args to arrays before checking for equality --- nipype/algorithms/tests/test_CompCor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nipype/algorithms/tests/test_CompCor.py b/nipype/algorithms/tests/test_CompCor.py index eeb3ce42db..51b1ea60f7 100644 --- a/nipype/algorithms/tests/test_CompCor.py +++ b/nipype/algorithms/tests/test_CompCor.py @@ -12,6 +12,8 @@ def close_up_to_column_sign(a, b, rtol=1e-05, atol=1e-08, equal_nan=False): """SVD can produce sign flips on a per-column basis.""" + a = np.asanyarray(a) + b = np.asanyarray(b) kwargs = dict(rtol=rtol, atol=atol, equal_nan=equal_nan) if np.allclose(a, b, **kwargs): return True