diff --git a/Chapter04/local_features.py b/Chapter04/local_features.py
index a56a397f8813420758405af29529b4c95e64e57b..9090f600fd855b9a340f1ad84fe05e3e501c69bf 100644
--- a/Chapter04/local_features.py
+++ b/Chapter04/local_features.py
@@ -20,6 +20,7 @@ def get_gauss_feat_im(im, sigma=1, normalize=True):
              vector for every pixel in the image.
     Author: vand@dtu.dk, 2022
     """
+    im = im.astype(float)
     orders = [0, 
         [0, 1], [1, 0], 
         [0, 2], [1, 1], [2, 0],