Rescale number range which keeps orginal spacing
I have a number range as follows,
[0.31622776601683794, 0.26591479484724945, 0.24028114141347545,
0.22360679774997896,
0.21147425268811282, 0.20205155046766235, 0.19441308418139638,
0.1880301546543197,
0.18257418583505536, 0.17782794100389226]
I would like to rescale the number range so the first item is 1, the last
item 0 with all other items maintaing there spacing relative to the
original list.
Also I need all the values in the list to add up to 1 in the final list.
I'm absolutely rubbish at maths, so if anyone would know how do to this is
python I would be very grateful ...
No comments:
Post a Comment