diff --git a/gstlal-inspiral/python/templates.py b/gstlal-inspiral/python/templates.py
index fa745ab6c25ee80e9af1c12798caa200f375552d..7ac0b1ff0e19af3f70ad7ad3afafa4d56fbc37ef 100644
--- a/gstlal-inspiral/python/templates.py
+++ b/gstlal-inspiral/python/templates.py
@@ -366,7 +366,7 @@ def time_slices(
 
 
 def hplus_of_f(m1, m2, s1, s2, f_min, f_max, delta_f):
-	farr = numpy.linspace(0, f_max, f_max / delta_f + delta_f)
+	farr = numpy.linspace(0, f_max, int(f_max / delta_f + 1))
 	spin1 = [0., 0., s1]; spin2 = [0., 0., s2]
 	hp, hc = lalsim.SimInspiralFD(
 		m1 * lal.MSUN_SI, m2 * lal.MSUN_SI,