summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2018-07-31 14:49:30 +0100
committerGitHub <noreply@github.com>2018-07-31 14:49:30 +0100
commitc8a628773fa5fe281acd2c701dd96a9824f22713 (patch)
treecc73077803ab0d6d9c07190a26e0174cac8b398c /Wrappers/Python
parent5d6cabba5428f9ddf4c4487ffc2668a6fb70cb17 (diff)
downloadframework-c8a628773fa5fe281acd2c701dd96a9824f22713.tar.gz
framework-c8a628773fa5fe281acd2c701dd96a9824f22713.tar.bz2
framework-c8a628773fa5fe281acd2c701dd96a9824f22713.tar.xz
framework-c8a628773fa5fe281acd2c701dd96a9824f22713.zip
Added copy as alias of clone, use copy in algs (#131)
closes #126
Diffstat (limited to 'Wrappers/Python')
-rw-r--r--Wrappers/Python/ccpi/framework.py7
-rwxr-xr-xWrappers/Python/ccpi/optimisation/algs.py4
2 files changed, 7 insertions, 4 deletions
diff --git a/Wrappers/Python/ccpi/framework.py b/Wrappers/Python/ccpi/framework.py
index f4cd406..485e96b 100644
--- a/Wrappers/Python/ccpi/framework.py
+++ b/Wrappers/Python/ccpi/framework.py
@@ -34,7 +34,7 @@ def find_key(dic, val):
return [k for k, v in dic.items() if v == val][0]
-class ImageGeometry:
+class ImageGeometry(object):
def __init__(self,
voxel_num_x=0,
@@ -105,7 +105,7 @@ class ImageGeometry:
return repres
-class AcquisitionGeometry:
+class AcquisitionGeometry(object):
def __init__(self,
geom_type,
@@ -571,6 +571,9 @@ class DataContainer(object):
dimension_labels=self.dimension_labels,
deep_copy=True,
geometry=self.geometry )
+ def copy(self):
+ '''alias of clone'''
+ return self.clone()
def get_data_axes_order(self,new_order=None):
'''returns the axes label of self as a list
diff --git a/Wrappers/Python/ccpi/optimisation/algs.py b/Wrappers/Python/ccpi/optimisation/algs.py
index a45100c..f025bbb 100755
--- a/Wrappers/Python/ccpi/optimisation/algs.py
+++ b/Wrappers/Python/ccpi/optimisation/algs.py
@@ -191,8 +191,8 @@ def CGLS(x_init, operator , data , opt=None):
tol = opt['tol']
max_iter = opt['iter']
- r = data.clone()
- x = x_init.clone()
+ r = data.copy()
+ x = x_init.copy()
d = operator.adjoint(r)