diff options
Diffstat (limited to 'Wrappers/Python')
-rw-r--r-- | Wrappers/Python/ccpi/framework.py | 7 | ||||
-rwxr-xr-x | Wrappers/Python/ccpi/optimisation/algs.py | 4 |
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) |