diff --git a/fsl/data/imagewrapper.py b/fsl/data/imagewrapper.py
index b73cb879aaf88ffa1e742477b3625fd7da91a590..2b49e4af594268f49a48a5dc280c323bc45d8eda 100644
--- a/fsl/data/imagewrapper.py
+++ b/fsl/data/imagewrapper.py
@@ -301,7 +301,14 @@ class ImageWrapper(notifier.Notifier):
 
         # Internally, we calculate and store the
         # data range for each volume/slice/vector
-        self.__volRanges = np.zeros((nvols, 2), dtype=np.float32)
+        #
+        # We use nan as a placeholder, so the
+        # dtype must be non-integral
+        dtype = self.__image.get_data_dtype()
+        if np.issubdtype(dtype, np.integer):
+            dtype = np.float32
+        self.__volRanges = np.zeros((nvols, 2),
+                                    dtype=dtype)
 
         self.__coverage[ :] = np.nan
         self.__volRanges[:] = np.nan