From 8277d8c27f8aee1bdbb36f5f6d28f3642dd7f991 Mon Sep 17 00:00:00 2001
From: Cody Messick <cody.messick@ligo.org>
Date: Fri, 1 Mar 2019 12:10:52 -0800
Subject: [PATCH] inspiral.py: Enforce that appended zeros in subthreshold
 trigger generation have same dtype as snr time series

---
 gstlal-inspiral/python/inspiral.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gstlal-inspiral/python/inspiral.py b/gstlal-inspiral/python/inspiral.py
index 78ab0e0765..78e260248d 100644
--- a/gstlal-inspiral/python/inspiral.py
+++ b/gstlal-inspiral/python/inspiral.py
@@ -651,9 +651,9 @@ class GracedBWrapper(object):
 				snr_time_series_array = snr_time_series_array[idx0:idxf]
 				if snr_time_series_array.shape[0] != snr_length:
 					if idx0 == 0:
-						snr_time_series_array = numpy.append(snr_time_series_array, numpy.zeros(snr_length - snr_time_series_array.shape[0]))
+						snr_time_series_array = numpy.append(snr_time_series_array, numpy.zeros(snr_length - snr_time_series_array.shape[0], dtype=snr_time_series_array.dtype))
 					elif idxf != peak_idx + autocorrelation_length + 1:
-						snr_time_series_array = numpy.insert(snr_time_series_array, 0, numpy.zeros(snr_length - snr_time_series_array.shape[0]))
+						snr_time_series_array = numpy.insert(snr_time_series_array, 0, numpy.zeros(snr_length - snr_time_series_array.shape[0], dtype=snr_time_series_array.dtype))
 					else:
 						print >>sys.stderr, "unexpected conditional while making sub-threshold trigger for %s, skipping. idx0 = %d, idxf = %d" % (ifo, idx0, idxf)
 						continue
-- 
GitLab