summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Wrappers/Python')
-rw-r--r--Wrappers/Python/demo/test_cpu_regularizers.py10
-rw-r--r--Wrappers/Python/src/cpu_regularizers.pyx5
2 files changed, 6 insertions, 9 deletions
diff --git a/Wrappers/Python/demo/test_cpu_regularizers.py b/Wrappers/Python/demo/test_cpu_regularizers.py
index f1eb3c3..7f08605 100644
--- a/Wrappers/Python/demo/test_cpu_regularizers.py
+++ b/Wrappers/Python/demo/test_cpu_regularizers.py
@@ -111,12 +111,10 @@ rms = rmse(Im, splitbregman)
pars['rmse'] = rms
txtstr = printParametersToString(pars)
txtstr += "%s = %.3fs" % ('elapsed time',timeit.default_timer() - start_time)
-print (txtstr)
-
+print (txtstr)
a=fig.add_subplot(2,4,2)
-
# these are matplotlib.patch.Patch properties
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
# place a text box in upper left in axes coords
@@ -130,14 +128,14 @@ imgplot = plt.imshow(splitbregman,\
start_time = timeit.default_timer()
pars = {'algorithm' : TV_FGP_CPU , \
- 'input' : u0,
+ 'input' : u0,\
'regularization_parameter':0.07, \
'number_of_iterations' :300 ,\
'tolerance_constant':0.00001,\
'methodTV': 0 ,\
'nonneg': 0 ,\
- 'printingOut': 0
-}
+ 'printingOut': 0
+ }
out = TV_FGP_CPU (pars['input'],
pars['regularization_parameter'],
diff --git a/Wrappers/Python/src/cpu_regularizers.pyx b/Wrappers/Python/src/cpu_regularizers.pyx
index d62ca59..60e8627 100644
--- a/Wrappers/Python/src/cpu_regularizers.pyx
+++ b/Wrappers/Python/src/cpu_regularizers.pyx
@@ -93,7 +93,7 @@ def TV_FGP_2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData,
return outputData
def TV_FGP_3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData,
- float regularization_parameter,
+ float regularization_parameter,
int iterationsNumb,
float tolerance_param,
int methodTV,
@@ -109,11 +109,10 @@ def TV_FGP_3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData,
#/* Run ROF iterations for 3D data */
TV_FGP_CPU_main(&inputData[0,0,0], &outputData[0,0,0], regularization_parameter,
- iterationsNumb,
+ iterationsNumb,
tolerance_param,
methodTV,
nonneg,
printM,
dims[0], dims[1], dims[2])
-
return outputData