File "<__array_function__ internals>", line 180, in isclose
File "/home/yoh/proj/heudiconv/heudiconv-master/venvs/dev3/lib/python3.10/site-packages/numpy/core/numeric.py", line 2372, in isclose
xfin = isfinite(x)
TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
as a logical workaround I have decided to add an explicit check for them both
being None. There may be could be cases where one of them would be None or
other cases where similarly np.allclose is done without similar guarding. If
encountered, a better comparator should be introduced, but for this this
addresses that original issue in heudiconv.
This situation was encountered in https://github.com/nipy/heudiconv/issues/582 where we got Nones for both values but then np.allclose errored out to compare on them due to
as a logical workaround I have decided to add an explicit check for them both being None. There may be could be cases where one of them would be None or other cases where similarly np.allclose is done without similar guarding. If encountered, a better comparator should be introduced, but for this this addresses that original issue in heudiconv.