b776ae08e9e676435c5cf8d1f31a86dfd3e1897f,chainercv/utils/image/read_image.py,,read_image,#Any#Any#Any#,5

Before Change


        return img[np.newaxis]
    else:
        // transpose (H, W, C) -> (C, H, W)
        return img.transpose((2, 0, 1))

After Change


    Returns:
        ~numpy.ndarray: An image.
    
    if chainer.config.cv_read_image_backend == "cv2":
        if _cv2_available:
            return _read_image_cv2(path, dtype, color)
        else:
            warnings.warn(
                "Although `chainer.config.cv_read_image_backend == "cv2"`, "
                "cv2 is not found. As a fallback option, read_image uses "
                "PIL. Either install cv2 or set "
                "`chainer.config.cv_read_image_backend = "PIL" to suppress "
                "this warning.")
            return _read_image_pil(path, dtype, color)
    elif chainer.config.cv_read_image_backend == "PIL":
        return _read_image_pil(path, dtype, color)
    else:
        raise ValueError("chainer.config.cv_read_image_backend should be "
                         "either "cv2" or "PIL".")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: chainer/chainercv
Commit Name: b776ae08e9e676435c5cf8d1f31a86dfd3e1897f
Time: 2018-10-20
Author: yuyuniitani@gmail.com
File Name: chainercv/utils/image/read_image.py
Class Name:
Method Name: read_image


Project Name: streamlit/streamlit
Commit Name: f3914c312fada4bfbda42caca6aaa4c9cd00d3c7
Time: 2018-01-25
Author: adrien.g.treuille@gmail.com
File Name: tiny_notebook/image_proto.py
Class Name:
Method Name: convert_to_3_color_channels


Project Name: tensorflow/lattice
Commit Name: 1c75176947730de8322acf6ad996096625e92e3a
Time: 2020-06-15
Author: no-reply@google.com
File Name: tensorflow_lattice/python/lattice_layer.py
Class Name: Lattice
Method Name: call