The following code uses Colour for the HSV to RGB conversion:
def colour_wheel(samples=1024, clip_circle=True, method='Colour'):
xx, yy = np.meshgrid(
np.linspace(-1, 1, samples), np.linspace(-1, 1, samples))
S = np.sqrt(xx ** 2 + yy ** 2)
H = (np.arctan2(xx, yy) + np.pi) / (np.pi * 2)
HSV = colour.utilities.tstack([H, S, np.ones(H.shape)])
RGB = colour.HSV_to_RGB(HSV)
if clip_circle == True:
RGB[S > 1] = 0
A = np.where(S > 1, 0, 1)
else:
A = np.ones(S.shape)
if method.lower()== 'matplotlib':
RGB = colour.utilities.orient(RGB, '90 CW')
elif method.lower()== 'nuke':
RGB = colour.utilities.orient(RGB, 'Flip')
RGB = colour.utilities.orient(RGB, '90 CW')
R, G, B = colour.utilities.tsplit(RGB)
return colour.utilities.tstack([R, G, B, A])

We use it in this interactive Jupyter Notebook Matplotlib Widget:

The repository is available here: https://github.com/colour-science/gamut-mapping-ramblings