I have an array in numpy of values within the range: [0, 255] (ubyte)
and want to remap it to a new range [0.0, 1.0](float)
x = [0, 127, 255]
should become
x = [0.0, 0.5, 1.0]
That post Convert a number range to another range, maintaining ratio is very general way how to remap a range, but doesn't explain how to conveniently do it in numpy.