Skip to content
Snippets Groups Projects
Commit 55832207 authored by Jan David Mol's avatar Jan David Mol
Browse files

Fix detecting changes on numpy arrays

parent c14501f5
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
from typing import Dict from typing import Dict
import numpy
from tango.server import Device from tango.server import Device
...@@ -34,7 +36,7 @@ class ChangeEvents: ...@@ -34,7 +36,7 @@ class ChangeEvents:
def send_change_event(self, attr_name: str, value: object | None): def send_change_event(self, attr_name: str, value: object | None):
"""Emits a CHANGE_EVENT if the attribute has changed value.""" """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 # no change
return return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment