diff options
Diffstat (limited to 'Wrappers')
-rw-r--r-- | Wrappers/Python/ccpi/framework.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Wrappers/Python/ccpi/framework.py b/Wrappers/Python/ccpi/framework.py index 9938fb7..318eb92 100644 --- a/Wrappers/Python/ccpi/framework.py +++ b/Wrappers/Python/ccpi/framework.py @@ -720,6 +720,10 @@ class DataContainer(object): ## reductions def sum(self, out=None, *args, **kwargs): return self.as_array().sum(*args, **kwargs) + def norm(self): + '''return the norm of the DataContainer''' + y = self.as_array() + return numpy.dot(y, y.conjugate()) class ImageData(DataContainer): '''DataContainer for holding 2D or 3D DataContainer''' |