Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
55832207
Commit
55832207
authored
1 year ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
Fix detecting changes on numpy arrays
parent
c14501f5
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tangostationcontrol/tangostationcontrol/common/events/change_events.py
+3
-1
3 additions, 1 deletion
...ontrol/tangostationcontrol/common/events/change_events.py
with
3 additions
and
1 deletion
tangostationcontrol/tangostationcontrol/common/events/change_events.py
+
3
−
1
View file @
55832207
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment