b8a5e5db6c2c0ff9540d84c11c05b21fc6023ae6,skimage/color/colorconv.py,,rgba2rgb,#Any#Any#,163
Before Change
channels = arr[..., :-1]
out = np.empty_like(channels)
for ichan in range(channels.shape[-1]):
out[..., ichan] = np.clip(
(1 - alpha) * background[ichan] + alpha * channels[..., ichan],
a_min=0, a_max=1)
return out
def rgb2hsv(rgb):
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]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
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: openai/baselines
Commit Name: 6c44fb28fecdb666182e2951b7b1cbe9cf198ff1
Time: 2018-12-19
Author: peterzhokhoff@gmail.com
File Name: baselines/her/rollout.py
Class Name: RolloutWorker
Method Name: generate_rollouts
Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 374ca541aaf62aba88a144acbbc7398ca3e995ef
Time: 2018-11-26
Author: jcastaldo08@gmail.com
File Name: category_encoders/ordinal.py
Class Name: OrdinalEncoder
Method Name: ordinal_encoding