Skip to content
Snippets Groups Projects
Commit a80fa93f authored by Jan David Mol's avatar Jan David Mol Committed by Thomas Juerges
Browse files

L2SS-281: Return a scalar if given a scalar

L2SS-244: Return a scalar if given a scalar

(cherry picked from commit 68b98aa8)
parent 777a55cd
Branches
Tags
1 merge request!61L2SS-281: Move attribute extender bug fixes to a dedicated master branch
...@@ -199,7 +199,8 @@ class ProtocolAttribute: ...@@ -199,7 +199,8 @@ class ProtocolAttribute:
value = numpy.array(self.node.get_value()) value = numpy.array(self.node.get_value())
if self.dim_y + self.dim_x == 1: if self.dim_y + self.dim_x == 1:
return numpy.array([value]) # scalar
return value
elif self.dim_y != 0: elif self.dim_y != 0:
value = numpy.array(numpy.split(value, indices_or_sections=self.dim_y)) value = numpy.array(numpy.split(value, indices_or_sections=self.dim_y))
elif self.dim_y + self.dim_x == 1: elif self.dim_y + self.dim_x == 1:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment