diff --git a/python/pyrogue/_Block.py b/python/pyrogue/_Block.py index 57720f163..cb167c233 100644 --- a/python/pyrogue/_Block.py +++ b/python/pyrogue/_Block.py @@ -12,10 +12,12 @@ # contained in the LICENSE.txt file. #----------------------------------------------------------------------------- import threading +import numpy as np import pyrogue as pr import rogue.interfaces.memory as rim + def startTransaction(block, *, type, forceWr=False, checkEach=False, variable=None, index=-1, **kwargs): """ Helper function for calling the startTransaction function in a block. This helper @@ -228,10 +230,12 @@ def set(self, var, value, index=-1): """ with self._lock: - if index < 0 and (isinstance(value, list) or isinstance(value,dict)): + if index < 0 and (isinstance(value, list) or isinstance(value, dict)): changed = True elif index >= 0: changed = self._value[index] != value + elif isinstance(value, np.ndarray): + changed = np.array_equal(self._value, value) else: changed = self._value != value