Skip to content

Commit

Permalink
TEST: Coerce close_up_to_column_sign args to arrays before checking f…
Browse files Browse the repository at this point in the history
…or equality
  • Loading branch information
effigies committed Aug 22, 2022
1 parent f4a1f52 commit ac1e2d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nipype/algorithms/tests/test_CompCor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ac1e2d1

Please sign in to comment.