Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace int conversion with //
  • Loading branch information
asitstands committed Mar 22, 2018
commit ee8d1ab02ce7ba7755057fb5b12adf4b3d563a4c
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 = int(new_size * h / w), new_size
new_h, new_w = new_size * h // w, new_size
else:
new_h, new_w = new_size, int(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