summaryrefslogtreecommitdiffstats
path: root/Wrappers
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2019-04-12 14:03:17 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2019-04-12 14:03:17 +0100
commit849e40b45284bc879eaa2c6bc1fe1ba2a15de6c3 (patch)
tree7b866b7063d13d40dd57a9b5d1ab43529902eb6b /Wrappers
parentb4f439677fa9a8d8235b2ddc0dcbda88cab7b76b (diff)
downloadframework-849e40b45284bc879eaa2c6bc1fe1ba2a15de6c3.tar.gz
framework-849e40b45284bc879eaa2c6bc1fe1ba2a15de6c3.tar.bz2
framework-849e40b45284bc879eaa2c6bc1fe1ba2a15de6c3.tar.xz
framework-849e40b45284bc879eaa2c6bc1fe1ba2a15de6c3.zip
removed comments
Diffstat (limited to 'Wrappers')
-rwxr-xr-xWrappers/Python/ccpi/framework/framework.py160
1 files changed, 1 insertions, 159 deletions
diff --git a/Wrappers/Python/ccpi/framework/framework.py b/Wrappers/Python/ccpi/framework/framework.py
index 3982965..2453986 100755
--- a/Wrappers/Python/ccpi/framework/framework.py
+++ b/Wrappers/Python/ccpi/framework/framework.py
@@ -496,119 +496,6 @@ class DataContainer(object):
return self.shape == other.shape
## algebra
-# def __add__(self, other, *args, **kwargs):
-# out = kwargs.get('out', None)
-#
-# if issubclass(type(other), DataContainer):
-# if self.check_dimensions(other):
-# out = self.as_array() + other.as_array()
-# return type(self)(out,
-# deep_copy=True,
-# dimension_labels=self.dimension_labels,
-# geometry=self.geometry)
-# else:
-# raise ValueError('Wrong shape: {0} and {1}'.format(self.shape,
-# other.shape))
-# elif isinstance(other, (int, float, complex)):
-# return type(self)(
-# self.as_array() + other,
-# deep_copy=True,
-# dimension_labels=self.dimension_labels,
-# geometry=self.geometry)
-# else:
-# raise TypeError('Cannot {0} DataContainer with {1}'.format("add" ,
-# type(other)))
-# # __add__
-#
-# def __sub__(self, other):
-# if issubclass(type(other), DataContainer):
-# if self.check_dimensions(other):
-# out = self.as_array() - other.as_array()
-# return type(self)(out,
-# deep_copy=True,
-# dimension_labels=self.dimension_labels,
-# geometry=self.geometry)
-# else:
-# raise ValueError('__sub__ Wrong shape: {0} and {1}'.format(self.shape,
-# other.shape))
-# elif isinstance(other, (int, float, complex)):
-# return type(self)(self.as_array() - other,
-# deep_copy=True,
-# dimension_labels=self.dimension_labels,
-# geometry=self.geometry)
-# else:
-# raise TypeError('Cannot {0} DataContainer with {1}'.format("subtract" ,
-# type(other)))
-# # __sub__
-# def __truediv__(self,other):
-# return self.__div__(other)
-#
-# def __div__(self, other):
-# if issubclass(type(other), DataContainer):
-# if self.check_dimensions(other):
-# out = self.as_array() / other.as_array()
-# return type(self)(out,
-# deep_copy=True,
-# dimension_labels=self.dimension_labels,
-# geometry=self.geometry)
-# else:
-# raise ValueError('__div__ Wrong shape: {0} and {1}'.format(self.shape,
-# other.shape))
-# elif isinstance(other, (int, float, complex)):
-# return type(self)(self.as_array() / other,
-# deep_copy=True,
-# dimension_labels=self.dimension_labels,
-# geometry=self.geometry)
-# else:
-# raise TypeError('Cannot {0} DataContainer with {1}'.format("divide" ,
-# type(other)))
-# # __div__
-#
-# def __pow__(self, other):
-# if issubclass(type(other), DataContainer):
-# if self.check_dimensions(other):
-# out = self.as_array() ** other.as_array()
-# return type(self)(out,
-# deep_copy=True,
-# dimension_labels=self.dimension_labels,
-# geometry=self.geometry)
-# else:
-# raise ValueError('__pow__ Wrong shape: {0} and {1}'.format(self.shape,
-# other.shape))
-# elif isinstance(other, (int, float, complex)):
-# return type(self)(self.as_array() ** other,
-# deep_copy=True,
-# dimension_labels=self.dimension_labels,
-# geometry=self.geometry)
-# else:
-# raise TypeError('pow: Cannot {0} DataContainer with {1}'.format("power" ,
-# type(other)))
-# # __pow__
-#
-# def __mul__(self, other):
-# if issubclass(type(other), DataContainer):
-# if self.check_dimensions(other):
-# out = self.as_array() * other.as_array()
-# return type(self)(out,
-# deep_copy=True,
-# dimension_labels=self.dimension_labels,
-# geometry=self.geometry)
-# else:
-# raise ValueError('*:Wrong shape: {0} and {1}'.format(self.shape,
-# other.shape))
-# elif isinstance(other, (int, float, complex,\
-# numpy.int, numpy.int8, numpy.int16, numpy.int32, numpy.int64,\
-# numpy.float, numpy.float16, numpy.float32, numpy.float64, \
-# numpy.complex)):
-# return type(self)(self.as_array() * other,
-# deep_copy=True,
-# dimension_labels=self.dimension_labels,
-# geometry=self.geometry)
-#
-# else:
-# raise TypeError('Cannot {0} DataContainer with {1}'.format("multiply" ,
-# type(other)))
-# # __mul__
def __add__(self, other):
return self.add(other)
@@ -684,52 +571,7 @@ class DataContainer(object):
kw = {'out':self}
return self.divide(other, **kw)
-# def __iadd__(self, other):
-# if isinstance(other, (int, float)) :
-# numpy.add(self.array, other, out=self.array)
-# elif issubclass(type(other), DataContainer):
-# if self.check_dimensions(other):
-# numpy.add(self.array, other.array, out=self.array)
-# else:
-# raise ValueError('Dimensions do not match')
-# return self
-# # __iadd__
-#
-# def __imul__(self, other):
-# if isinstance(other, (int, float)) :
-# arr = self.as_array()
-# numpy.multiply(arr, other, out=arr)
-# elif issubclass(type(other), DataContainer):
-# if self.check_dimensions(other):
-# numpy.multiply(self.array, other.array, out=self.array)
-# else:
-# raise ValueError('Dimensions do not match')
-# return self
-# # __imul__
-#
-# def __isub__(self, other):
-# if isinstance(other, (int, float)) :
-# numpy.subtract(self.array, other, out=self.array)
-# elif issubclass(type(other), DataContainer):
-# if self.check_dimensions(other):
-# numpy.subtract(self.array, other.array, out=self.array)
-# else:
-# raise ValueError('Dimensions do not match')
-# return self
-# # __isub__
-#
-# def __idiv__(self, other):
-# return self.__itruediv__(other)
-# def __itruediv__(self, other):
-# if isinstance(other, (int, float)) :
-# numpy.divide(self.array, other, out=self.array)
-# elif issubclass(type(other), DataContainer):
-# if self.check_dimensions(other):
-# numpy.divide(self.array, other.array, out=self.array)
-# else:
-# raise ValueError('Dimensions do not match')
-# return self
-# # __idiv__
+
def __str__ (self, representation=False):
repres = ""