From fe38fbf31f1c0fbae54347a6dde2203917867af2 Mon Sep 17 00:00:00 2001
From: Chad Hanna <chad.hanna@ligo.org>
Date: Tue, 4 Apr 2023 12:34:17 -0700
Subject: [PATCH] handle 1D arrays

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

diff --git a/gstlal/python/pipeio.py b/gstlal/python/pipeio.py
index 5027660f0c..4630a4a52b 100644
--- a/gstlal/python/pipeio.py
+++ b/gstlal/python/pipeio.py
@@ -281,6 +281,10 @@ def to_gvalue_array(arr):
 	# handle segments as guint64
 	if isinstance(arr, segment):
 		st = Gst.Structure(f"converter, array=(guint64) < {arr[0]:d}, {arr[1]:d} >")
+	elif isinstance(arr, numpy.ndarray):
+		arr = arr.tolist()
+		st = Gst.Structure.new_empty("converter")
+		st["array"] = Gst.ValueArray(list(arr))
 	else:
 		st = Gst.Structure.new_empty("converter")
 		st["array"] = Gst.ValueArray(list(arr))
-- 
GitLab