You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by jx...@apache.org on 2018/03/23 18:36:50 UTC

[incubator-mxnet] branch master updated: Fix failed test with opencv 3.4.1 (#10197)

This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new ce2ce9b  Fix failed test with opencv 3.4.1 (#10197)
ce2ce9b is described below

commit ce2ce9b496d59123bbc93b7822511730867a9b77
Author: Deokjae Lee <36...@users.noreply.github.com>
AuthorDate: Sat Mar 24 03:36:46 2018 +0900

    Fix failed test with opencv 3.4.1 (#10197)
    
    * Fix failed test with opencv 3.4.1
    
    * Replace int conversion with `//`
    
    * retrigger test
---
 tests/python/unittest/test_image.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/python/unittest/test_image.py b/tests/python/unittest/test_image.py
index 124c94c..78c3ce1 100644
--- a/tests/python/unittest/test_image.py
+++ b/tests/python/unittest/test_image.py
@@ -110,9 +110,9 @@ class TestImage(unittest.TestCase):
             for _ in range(3):
                 new_size = np.random.randint(1, 1000)
                 if h > w:
-                    new_h, new_w = new_size * h / w, new_size
+                    new_h, new_w = new_size * h // w, new_size
                 else:
-                    new_h, new_w = new_size, new_size * w / h
+                    new_h, new_w = new_size, new_size * w // h
                 for interp in range(0, 2):
                     # area-based/lanczos don't match with cv2?
                     cv_resized = cv2.resize(cv_img, (new_w, new_h), interpolation=interp)

-- 
To stop receiving notification emails like this one, please contact
jxie@apache.org.