From 67a10adcc7321e25a71ff494d6df23c8632d3ecf Mon Sep 17 00:00:00 2001 From: ShenYuhan Date: Thu, 4 Feb 2021 14:55:23 +0800 Subject: [PATCH] fix version diff for function `pad` --- visualdl/utils/img_util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/visualdl/utils/img_util.py b/visualdl/utils/img_util.py index 0bb64c06..3d338e7a 100644 --- a/visualdl/utils/img_util.py +++ b/visualdl/utils/img_util.py @@ -28,7 +28,9 @@ def padding_image(img, height, width): width_before = math.floor((width - width_old) / 2) width_after = width - width_old - width_before - return np.pad(img, ((height_before, height_after), (width_before, width_after), (0, 0))) + return np.pad(array=img, + pad_width=((height_before, height_after), (width_before, width_after), (0, 0)), + mode="constant") def merge_images(imgs, dataformats, scale=1.0, rows=-1): -- GitLab