diff --git a/nibabel/tests/test_volumeutils.py b/nibabel/tests/test_volumeutils.py index 06df9eb6ad..fcdc5c2713 100644 --- a/nibabel/tests/test_volumeutils.py +++ b/nibabel/tests/test_volumeutils.py @@ -700,7 +700,7 @@ def test_a2f_non_numeric(): # Some versions of numpy can cast structured types to float, others not try: arr.astype(float) - except ValueError: + except (TypeError, ValueError): pass else: back_arr = write_return(arr, fobj, float)