diff options
Diffstat (limited to 'Wrappers/Python')
-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, |