diff --git a/ocrmypdf/leptonica.py b/ocrmypdf/leptonica.py
index <HASH>..<HASH> 100644
--- a/ocrmypdf/leptonica.py
+++ b/ocrmypdf/leptonica.py
@@ -170,7 +170,7 @@ class Pix:
         result = lept.pixCorrelationBinary(pix1.cpix, pix2.cpix, correlation)
         if result != 0:
             raise LeptonicaError("Correlation failed")
-        return correlation[0]
+        return float(correlation[0])
 
     @staticmethod
     def _pix_destroy(pix):
Travis again: are invalid correlation measurements a use-after-free?

Try explicitly casting the value to a float.