From 55832207cc79bb7d071dbd277321daa4a08b7482 Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Wed, 8 May 2024 08:33:49 +0200
Subject: [PATCH] Fix detecting changes on numpy arrays

---
 .../tangostationcontrol/common/events/change_events.py        | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tangostationcontrol/tangostationcontrol/common/events/change_events.py b/tangostationcontrol/tangostationcontrol/common/events/change_events.py
index cde4efa0a..d95403b4c 100644
--- a/tangostationcontrol/tangostationcontrol/common/events/change_events.py
+++ b/tangostationcontrol/tangostationcontrol/common/events/change_events.py
@@ -3,6 +3,8 @@
 
 from typing import Dict
 
+import numpy
+
 from tango.server import Device
 
 
@@ -34,7 +36,7 @@ class ChangeEvents:
     def send_change_event(self, attr_name: str, value: object | None):
         """Emits a CHANGE_EVENT if the attribute has changed value."""
 
-        if self.prev_values.get(attr_name) == value:
+        if numpy.equal(self.prev_values.get(attr_name), value).all():
             # no change
             return
 
-- 
GitLab