Skip to content

Commit d834f53

Browse files
committed
Fix #1984: Use float for result of rgb_to_hsv
1 parent b009b63 commit d834f53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ def rgb_to_hsv(arr):
12211221
convert rgb values in a numpy array to hsv values
12221222
input and output arrays should have shape (M,N,3)
12231223
"""
1224-
out = np.zeros_like(arr)
1224+
out = np.zeros(arr.shape, dtype=np.float)
12251225
arr_max = arr.max(-1)
12261226
ipos = arr_max > 0
12271227
delta = arr.ptp(-1)

0 commit comments

Comments
 (0)