summaryrefslogtreecommitdiffstats
path: root/Wrappers
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2018-02-21 10:49:34 +0000
committerEdoardo Pasca <edo.paskino@gmail.com>2018-02-21 10:49:34 +0000
commit26c0a07ea72d1caabcb9c7f73d00a32dff7c707e (patch)
tree17da0d546547e818d248b2b9dcef92aaeff8677d /Wrappers
parent1f84f8da7500b4f442aa546247989f8b094e26d7 (diff)
downloadframework-26c0a07ea72d1caabcb9c7f73d00a32dff7c707e.tar.gz
framework-26c0a07ea72d1caabcb9c7f73d00a32dff7c707e.tar.bz2
framework-26c0a07ea72d1caabcb9c7f73d00a32dff7c707e.tar.xz
framework-26c0a07ea72d1caabcb9c7f73d00a32dff7c707e.zip
added sum
Diffstat (limited to 'Wrappers')
-rw-r--r--Wrappers/Python/ccpi/framework.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Wrappers/Python/ccpi/framework.py b/Wrappers/Python/ccpi/framework.py
index 3cfa2a0..fc1aa21 100644
--- a/Wrappers/Python/ccpi/framework.py
+++ b/Wrappers/Python/ccpi/framework.py
@@ -343,6 +343,9 @@ class DataSet(object):
raise ValueError('Dimensions do not match')
# __rpow__
+ def sum(self):
+ return DataSet(self.as_array().sum(),
+ dimension_labels=self.dimension_labels)
# in-place arithmetic operators:
# (+=, -=, *=, /= , //=,