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

L2SS-909: Drop support for writing smaller array than the maximum size, as we...

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
parent 811d882e
No related branches found
No related tags found
1 merge request!399L2SS-909: Do not allow writes of smaller arrays
...@@ -42,7 +42,7 @@ class attribute_io(object): ...@@ -42,7 +42,7 @@ class attribute_io(object):
""" Writes the given value to the device, and updates the cache. """ """ 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. # 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): if isinstance(value, numpy.ndarray):
value_shape = value.shape value_shape = value.shape
else: else:
...@@ -115,9 +115,6 @@ class attribute_wrapper(attribute): ...@@ -115,9 +115,6 @@ class attribute_wrapper(attribute):
# actual shape of the data as it is read/written # actual shape of the data as it is read/written
self.shape = shape 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 access == AttrWriteType.READ_WRITE:
""" If the attribute is of READ_WRITE type, assign the write and read functions to it""" """ If the attribute is of READ_WRITE type, assign the write and read functions to it"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment