Commit fe8516f9 authored by Mickaël Seznec's avatar Mickaël Seznec
Browse files

Fix critical bug when interpolating high values

parent 4f601642
Pipeline #6772 failed with stages
in 18 seconds
......@@ -70,6 +70,9 @@ def flow_to_rgb(flow, flow_max_radius=None, background="bright", custom_colorwhe
angle[angle < 0] += 2 * np.pi
angle = angle * ((ncols - 1) / (2 * np.pi))
# Make the wheel cyclic for interpolation
wheel = np.vstack((wheel, wheel[0]))
# Interpolate the hues
(angle_fractional, angle_floor), angle_ceil = np.modf(angle), np.ceil(angle)
angle_fractional = angle_fractional.reshape((angle_fractional.shape) + (1,))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment