From 26c0a07ea72d1caabcb9c7f73d00a32dff7c707e Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Wed, 21 Feb 2018 10:49:34 +0000 Subject: added sum --- Wrappers/Python/ccpi/framework.py | 3 +++ 1 file changed, 3 insertions(+) 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: # (+=, -=, *=, /= , //=, -- cgit v1.2.3