From 63465524981420be9245446913cbb967f799d791 Mon Sep 17 00:00:00 2001 From: Rashad Kanavath <rashad.kanavath@c-s.fr> Date: Fri, 9 Oct 2015 16:35:09 +0200 Subject: [PATCH] BUG: use sys.argv instead of argv when using import sys --- Modules/Wrappers/SWIG/test/python/PythonNumpyTest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/Wrappers/SWIG/test/python/PythonNumpyTest.py b/Modules/Wrappers/SWIG/test/python/PythonNumpyTest.py index 583b6aa2a2..7aee4e2a5d 100644 --- a/Modules/Wrappers/SWIG/test/python/PythonNumpyTest.py +++ b/Modules/Wrappers/SWIG/test/python/PythonNumpyTest.py @@ -15,8 +15,8 @@ import otbApplication #from PIL import Image as PILImage -inFile = sys.argv[1] -prefix = sys.argv[2] +inFile = sys.argv[1] +outFile = sys.argv[2] # pilimage = PILImage.open(inFile) # npimage = np.asarray(pilimage) # print npimage.dtype @@ -60,5 +60,5 @@ Smoothing = otbApplication.Registry.CreateApplication("Smoothing") #take numpy output from Convert application and feed into Smoothing Smoothing.SetVectorImageFromNumpyArray("in", ConvertOut) Smoothing.SetParameterString("type", 'anidif') -Smoothing.SetParameterString("out", argv[2]) +Smoothing.SetParameterString("out", outFile) Smoothing.ExecuteAndWriteOutput() -- GitLab