From 2253a03b9be3f5209969af3841068fc24aa3726f Mon Sep 17 00:00:00 2001
From: Thomas Juerges <4-jurges@users.noreply.git.astron.nl>
Date: Fri, 12 Feb 2021 19:54:08 +0100
Subject: [PATCH] Add casting to numpy.array for fpga_scrap_R and
 fpga_weights_R

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

diff --git a/SDP/SDP/SDP.py b/SDP/SDP/SDP.py
index 9e559cb3e..ddf00c5b4 100644
--- a/SDP/SDP/SDP.py
+++ b/SDP/SDP/SDP.py
@@ -310,7 +310,7 @@ class SDP(Device):
     @fault_on_error
     def read_fpga_scrap_R(self):
         """Return the fpga_scrap_R attribute."""
-        self._fpga_scrap_R = numpy.array(numpy.split(self.attribute_mapping["fpga_scrap_R"].get_data_value().Value.Value, indices_or_sections = 16))
+        self._fpga_scrap_R = numpy.array(numpy.split(numpy.array(self.attribute_mapping["fpga_scrap_R"].get_data_value().Value.Value, indices_or_sections = 16)))
         return self._fpga_scrap_R
 
     @only_when_on
@@ -351,7 +351,7 @@ class SDP(Device):
     @fault_on_error
     def read_fpga_weights_R(self):
         """Return the fpga_weights_R attribute."""
-        value = numpy.array(numpy.split(self.attribute_mapping["fpga_weights_R"].get_value(), indices_or_sections = 16))
+        value = numpy.array(numpy.split(numpy.array(self.attribute_mapping["fpga_weights_R"].get_value(), indices_or_sections = 16)))
         self._fpga_weights_R = value
         return self._fpga_weights_R
 
-- 
GitLab