[Test] fix deprecated method
authorJaeyun <jy1210.jung@samsung.com>
Wed, 13 Jan 2021 10:08:13 +0000 (19:08 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Wed, 13 Jan 2021 10:44:34 +0000 (19:44 +0900)
tostring() method was deprecated from python v3.2.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
tests/nnstreamer_repo_lstm/generateTestCase.py
tests/nnstreamer_repo_rnn/generateTestCase.py

index 137f0cc..2d4dea5 100644 (file)
@@ -57,7 +57,7 @@ def genFrame(seq, out0, out1):
                 out0[location(c,w,h)] = in0[location(c,w,h)]
                 out1[location(c,w,h)] = (np.tanh(in0[location(c,w,h)]) * in2_tmp0)
 
-    return frame.tostring(), out0, out1
+    return frame.tobytes(), out0, out1
 
 filename = "video_4x4xBGRx.xraw"
 f = open(filename, "wb")
@@ -70,7 +70,7 @@ for seq in range(0, 10):
     string, out0, out1=genFrame(seq,out0, out1)
     if(seq == 9):
         with open(outfilename,'wb') as file:
-            file.write(out1.tostring())
+            file.write(out1.tobytes())
 
     f.write(string)
 
index 07ac1cd..23ae0fd 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 ##
 # SPDX-License-Identifier: LGPL-2.1-only
@@ -75,7 +75,7 @@ for seq in range(0, 10):
 
     if(seq == 9):
         with open(outfilename,'wb') as file:
-            file.write(out.tostring())
+            file.write(out.tobytes())
 
     f.write(frame)