diff --git a/pytools/convergence.py b/pytools/convergence.py
index ad7b74c78633989db8d7e656c4ae489f27d693ed..7cf96925e6d5431f8685e528aef755041354ae62 100644
--- a/pytools/convergence.py
+++ b/pytools/convergence.py
@@ -67,7 +67,7 @@ class EOCRecorder:
 
         # NOTE: in case any of the errors are exactly 0.0, which
         # can give NaNs in `estimate_order_of_convergence`
-        emax = np.amax(errors)
+        emax: float = np.amax(errors)
         errors += (1 if emax == 0 else emax) * np.finfo(errors.dtype).eps
 
         size = len(abscissae)
@@ -82,7 +82,8 @@ class EOCRecorder:
         return result
 
     def order_estimate(self) -> float:
-        return self.estimate_order_of_convergence()[0, 1]
+        from typing import cast
+        return cast(float, self.estimate_order_of_convergence()[0, 1])
 
     def max_error(self) -> float:
         return max(err for absc, err in self.history)