From e2dae9aa2d9fec731252f40d5368bcb240e328e3 Mon Sep 17 00:00:00 2001 From: Gleb Date: Sat, 14 Apr 2018 16:41:58 +0200 Subject: [PATCH] Backwards compability with python2 --- color_extractor/resize.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/color_extractor/resize.py b/color_extractor/resize.py index 7fe2df0..245f10a 100644 --- a/color_extractor/resize.py +++ b/color_extractor/resize.py @@ -1,3 +1,4 @@ +from __future__ import division import numpy as np from skimage.transform import resize @@ -37,7 +38,7 @@ def _resize(self, img): src_h, src_w = img.shape[:2] dst_h = self._settings['rows'] dst_w = int((dst_h / src_h) * src_w) - return resize(img, (dst_h, dst_w)) + return resize(img, (dst_h, dst_w), mode='constant') def _crop(self, img): src_h, src_w = img.shape[:2]