From a94a4041283395e6c166c8e203ee83edb9fe07ba Mon Sep 17 00:00:00 2001 From: Nickie S Date: Tue, 30 Apr 2019 17:02:46 +0300 Subject: [PATCH] Change as_grey to as_gray To hide skimage warning --- image_match/goldberg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/image_match/goldberg.py b/image_match/goldberg.py index da93ff8..e053b1c 100644 --- a/image_match/goldberg.py +++ b/image_match/goldberg.py @@ -236,14 +236,14 @@ def preprocess_image(image_or_path, bytestream=False, handle_mpo=False): return rgb2gray(np.asarray(img, dtype=np.uint8)) elif type(image_or_path) in string_types or \ type(image_or_path) is text_type: - return imread(image_or_path, as_grey=True) + return imread(image_or_path, as_gray=True) elif type(image_or_path) is bytes: try: img = Image.open(image_or_path) arr = np.array(img.convert('RGB')) except IOError: # try again due to PIL weirdness - return imread(image_or_path, as_grey=True) + return imread(image_or_path, as_gray=True) if handle_mpo: # take the first images from the MPO if arr.shape == (2,) and isinstance(arr[1].tolist(), MpoImageFile):