Is there a way to map an existing row in a numpy array with 3 RGB chars or do I have to convert it to a “#hex-triple” color string first?
I have to do this, for example:
colors = [’#{0:0>2x}{0:0>2x}{0:0>2x}’.format(int(i)) for i in np.nditer(data)]
when, I’d rather just do:
colors = np.concatenate([data, data, data], axis=1)
(or some bit packing magic if it just wants a 32-bit int)
I’ve tried the latter, but it doesn’t seem to do anything, and I haven’t dug into the code yet. All code examples show the stringified version.
