Skip to content

Commit 94b3048

Browse files
authored
Merge pull request #768 from effigies/fix/numpy_casting_error
FIX/TEST: Numpy casting rules have gotten more strict, raise different exception
2 parents eb3bd12 + 86b4fbe commit 94b3048

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/tests/test_volumeutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ def test_a2f_non_numeric():
700700
# Some versions of numpy can cast structured types to float, others not
701701
try:
702702
arr.astype(float)
703-
except ValueError:
703+
except (TypeError, ValueError):
704704
pass
705705
else:
706706
back_arr = write_return(arr, fobj, float)

0 commit comments

Comments
 (0)