From bdad04119a403476f48f9e0a851a740d3e7ecdea Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Fri, 2 Sep 2022 16:27:07 +0200 Subject: [PATCH] L2SS-909: Drop support for writing smaller array than the maximum size, as we do not use it or even allow it to be specified --- .../tangostationcontrol/clients/attribute_wrapper.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tangostationcontrol/tangostationcontrol/clients/attribute_wrapper.py b/tangostationcontrol/tangostationcontrol/clients/attribute_wrapper.py index 7b5372c01..ee898ff56 100644 --- a/tangostationcontrol/tangostationcontrol/clients/attribute_wrapper.py +++ b/tangostationcontrol/tangostationcontrol/clients/attribute_wrapper.py @@ -42,7 +42,7 @@ class attribute_io(object): """ Writes the given value to the device, and updates the cache. """ # flexible array sizes are not supported by all clients. make sure we only write arrays of maximum size. - if self.attribute_wrapper.write_max_shape and self.attribute_wrapper.shape != (): + if self.attribute_wrapper.shape != (): if isinstance(value, numpy.ndarray): value_shape = value.shape else: @@ -115,9 +115,6 @@ class attribute_wrapper(attribute): # actual shape of the data as it is read/written self.shape = shape - # force maximum shape to be written (do not accept writes with shapes smaller than the maximum for each dimension) - self.write_max_shape = True - if access == AttrWriteType.READ_WRITE: """ If the attribute is of READ_WRITE type, assign the write and read functions to it""" -- GitLab