b8a5e5db6c2c0ff9540d84c11c05b21fc6023ae6,skimage/color/colorconv.py,,rgba2rgb,#Any#Any#,163

Before Change


    
    arr = _prepare_rgba_array(rgba)
    if isinstance(background, tuple) and len(background) != 3:
        raise ValueError("the background must be a tuple with 3 items - the "
                         "RGB color of the background. Got {0} items."
                         .format(len(background)))

    alpha = arr[..., -1]
    channels = arr[..., :-1]
    out = np.empty_like(channels)

After Change


    if len(background) != 3:
        raise ValueError("background must be an array-like containing 3 RGB "
                         f"values. Got {len(background)} items")
    if np.any(background < 0) or np.any(background > 1):
        raise ValueError("background RGB values must be floats between "
                         "0 and 1.")

    background = background[np.newaxis, ...]
    alpha = arr[..., -1, np.newaxis]
    channels = arr[np.newaxis, ..., :-1]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: scikit-image/scikit-image
Commit Name: b8a5e5db6c2c0ff9540d84c11c05b21fc6023ae6
Time: 2020-05-04
Author: rfezzani@gmail.com
File Name: skimage/color/colorconv.py
Class Name:
Method Name: rgba2rgb


Project Name: matplotlib/matplotlib
Commit Name: da83457d51b516d036b3373c6805443f76185451
Time: 2019-04-03
Author: 2836374+timhoffm@users.noreply.github.com
File Name: lib/matplotlib/figure.py
Class Name: Figure
Method Name: set_size_inches


Project Name: pfnet/optuna
Commit Name: 9d4f0abbe43d9067bc11373f6d9c15ee0797a133
Time: 2020-02-28
Author: hiroyuki.vincent.yamazaki@gmail.com
File Name: optuna/importance/__init__.py
Class Name:
Method Name: get_param_importance