diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2018-10-17 22:16:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-17 22:16:22 +0100 |
commit | 1e9c45fc518cca8f40139ed6a4de299375a1c7ce (patch) | |
tree | 82a2b6ac16d333dfcf724ea6e71ca85c3f289cbf /Wrappers | |
parent | d00a41c8c6b95e9a56f6af221ebc2d23d9f8db9d (diff) | |
download | framework-1e9c45fc518cca8f40139ed6a4de299375a1c7ce.tar.gz framework-1e9c45fc518cca8f40139ed6a4de299375a1c7ce.tar.bz2 framework-1e9c45fc518cca8f40139ed6a4de299375a1c7ce.tar.xz framework-1e9c45fc518cca8f40139ed6a4de299375a1c7ce.zip |
closes #151 (#152)
Diffstat (limited to 'Wrappers')
-rw-r--r-- | Wrappers/Python/ccpi/framework.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Wrappers/Python/ccpi/framework.py b/Wrappers/Python/ccpi/framework.py index a34ca37..7249d64 100644 --- a/Wrappers/Python/ccpi/framework.py +++ b/Wrappers/Python/ccpi/framework.py @@ -377,7 +377,7 @@ class DataContainer(object): ## algebra - def __add__(self, other , *args, out=None, **kwargs): + def __add__(self, other , out=None, *args, **kwargs): if issubclass(type(other), DataContainer): if self.check_dimensions(other): out = self.as_array() + other.as_array() @@ -633,7 +633,7 @@ class DataContainer(object): ## binary operations - def pixel_wise_binary(self,pwop, x2 , *args, out=None, **kwargs): + def pixel_wise_binary(self,pwop, x2 , out=None, *args, **kwargs): if out is None: if isinstance(x2, (int, float, complex)): out = pwop(self.as_array() , x2 , *args, **kwargs ) @@ -673,19 +673,19 @@ class DataContainer(object): else: raise ValueError (message(type(self), "incompatible class:" , pwop.__name__, type(out))) - def add(self, other , *args, out=None, **kwargs): + def add(self, other , out=None, *args, **kwargs): return self.pixel_wise_binary(numpy.add, other, *args, out=out, **kwargs) - def subtract(self, other , *args, out=None, **kwargs): + def subtract(self, other, out=None , *args, **kwargs): return self.pixel_wise_binary(numpy.subtract, other, *args, out=out, **kwargs) - def multiply(self, other , *args, out=None, **kwargs): + def multiply(self, other , out=None, *args, **kwargs): return self.pixel_wise_binary(numpy.multiply, other, *args, out=out, **kwargs) - def divide(self, other , *args, out=None, **kwargs): + def divide(self, other , out=None ,*args, **kwargs): return self.pixel_wise_binary(numpy.divide, other, *args, out=out, **kwargs) - def power(self, other , *args, out=None, **kwargs): + def power(self, other , out=None, *args, **kwargs): return self.pixel_wise_binary(numpy.power, other, *args, out=out, **kwargs) def maximum(self,x2, out=None): @@ -693,7 +693,7 @@ class DataContainer(object): ## unary operations - def pixel_wise_unary(self,pwop, *args, out=None, **kwargs): + def pixel_wise_unary(self,pwop, out=None, *args, **kwargs): if out is None: out = pwop(self.as_array() , *args, **kwargs ) return type(self)(out, |