Skip to content

Commit

Permalink
Fix failed test with opencv 3.4.1 (apache#10197)
Browse files Browse the repository at this point in the history
* Fix failed test with opencv 3.4.1

* Replace int conversion with `//`

* retrigger test
  • Loading branch information
asitstands authored and zheng-da committed Jun 28, 2018
1 parent bc3d54a commit 71577d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/python/unittest/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ def test_resize_short(self):
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)
Expand Down

0 comments on commit 71577d6

Please sign in to comment.