8d0d0c7a6db3904f0222cbe058388a92cf21a548,calamari_ocr/ocr/dataset/imageprocessors/scale_to_height_processor.py,ScaleToHeightProcessor,scale_to_h,#,23

Before Change


            mode="constant",
            cval=cval)

        output = np.array(output, dtype=dtype)
        return output

After Change


        assert img.dtype == np.uint8

        h, w = img.shape[:2]
        if h == target_height:
            return img
        if h == 0 or img.size == 0:
            // empty image
            return np.zeros(shape=(target_height, w) + img.shape[2:], dtype=img.dtype)


        scale = target_height * 1.0 / h
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: Calamari-OCR/calamari
Commit Name: 8d0d0c7a6db3904f0222cbe058388a92cf21a548
Time: 2021-02-06
Author: ChWick@users.noreply.github.com
File Name: calamari_ocr/ocr/dataset/imageprocessors/scale_to_height_processor.py
Class Name: ScaleToHeightProcessor
Method Name: scale_to_h


Project Name: scikit-optimize/scikit-optimize
Commit Name: 00cce06892217b891c8a85ead8c51b28d556bd64
Time: 2016-08-08
Author: manojkumarsivaraj334@gmail.com
File Name: skopt/gp_opt.py
Class Name:
Method Name: gp_minimize


Project Name: scikit-optimize/scikit-optimize
Commit Name: 00cce06892217b891c8a85ead8c51b28d556bd64
Time: 2016-08-08
Author: manojkumarsivaraj334@gmail.com
File Name: skopt/tree_opt.py
Class Name:
Method Name: _tree_minimize