diff options
author | epapoutsellis <epapoutsellis@gmail.com> | 2019-04-04 17:39:30 +0100 |
---|---|---|
committer | epapoutsellis <epapoutsellis@gmail.com> | 2019-04-04 17:39:30 +0100 |
commit | ea7113b7d86453077dc45674ab8506aac5f2b8e0 (patch) | |
tree | f2b1bd249b20c70fbfbe69154307a611a12cad3e | |
parent | 8d11cade9c2dcf30d4a92ad9be4bc39b05c83b7e (diff) | |
download | framework-ea7113b7d86453077dc45674ab8506aac5f2b8e0.tar.gz framework-ea7113b7d86453077dc45674ab8506aac5f2b8e0.tar.bz2 framework-ea7113b7d86453077dc45674ab8506aac5f2b8e0.tar.xz framework-ea7113b7d86453077dc45674ab8506aac5f2b8e0.zip |
add get_item
-rwxr-xr-x | Wrappers/Python/ccpi/framework/BlockGeometry.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Wrappers/Python/ccpi/framework/BlockGeometry.py b/Wrappers/Python/ccpi/framework/BlockGeometry.py index d336305..0f43155 100755 --- a/Wrappers/Python/ccpi/framework/BlockGeometry.py +++ b/Wrappers/Python/ccpi/framework/BlockGeometry.py @@ -27,6 +27,10 @@ class BlockGeometry(object): raise ValueError(
'Dimension and size do not match: expected {} got {}'
.format(n_elements, len(args)))
+
+ def get_item(self, index):
+ '''returns the Geometry in the BlockGeometry located at position index'''
+ return self.geometries[index]
def allocate(self, value=0, dimension_labels=None):
containers = [geom.allocate(value) for geom in self.geometries]
|