Skip to content

Commit

Permalink
Fix the range of RGB values
Browse files Browse the repository at this point in the history
  • Loading branch information
c-bata committed Dec 6, 2023
1 parent baf52b4 commit d093d2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optuna/visualization/_rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,5 +436,5 @@ def _convert_color_idxs_to_scaled_rgb_colors(color_idxs: np.ndarray) -> np.ndarr
else:
cmap = matplotlib_plt.get_cmap(colormap)
colors = cmap(color_idxs)[:, :3] # Drop alpha values.
rgb_colors = np.asarray(colors * 256, dtype=int)
rgb_colors = np.asarray(colors * 255, dtype=int)
return rgb_colors

Check warning on line 440 in optuna/visualization/_rank.py

View check run for this annotation

Codecov / codecov/patch

optuna/visualization/_rank.py#L437-L440

Added lines #L437 - L440 were not covered by tests

0 comments on commit d093d2f

Please sign in to comment.