b8a5e5db6c2c0ff9540d84c11c05b21fc6023ae6,skimage/color/colorconv.py,,rgba2rgb,#,163
Before Change
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
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: 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: craffel/mir_eval
Commit Name: 3241912f4160c47e55e25f5812c8493d1f581fca
Time: 2014-04-23
Author: brm2132@columbia.edu
File Name: mir_eval/util.py
Class Name:
Method Name: validate_intervals
Project Name: pgmpy/pgmpy
Commit Name: a25eae5ec137b743faefc6f733b9bbc8fcb1011b
Time: 2014-12-23
Author: ankurankan@gmail.com
File Name: pgmpy/inference/ExactInference.py
Class Name: VariableElimination
Method Name: query