Modify the range of collection of numbers on scale of log5 for better visualization. It works best between 0-100. max,min is the max and min value from the present list and, a and b are the max and min values you want. It will set values between a and b. Then convert it to the scale of log5
Project description
Modify Range of numbers
Modify the range of collection of numbers on scale of log5 for better visualization. It works best between 0-100. max,min are the max and min value from the present list and, a and b are the max and min values you want of the new range. It is then converted into logarithmic scale.
Run the following to install:
pip install modify_range
Is based on the formula:
f(x) = (b-a)(x-min)/(max-min)
To convert:
from modify_range import change_range
...
...
x = change_range(x,min,max,a,b)
Here,
- x = integer from the list
- min = min value from the list
- max = max value from the list
- a = new maximum value
- b = new minimum value
To get back the values: (not recommended to use, as original values are lost while converting to logarithmic scale. Exact values cannot be obtained)
x = inverse_range(x,min,max,a,b)
Here,
- x = integer value from the modified list
- max = maximum integer value from the modified list
- min = minimum integer value from the modified list
- a = max value from the original list
- b = min value from the original list
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for modify_range-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a171ad7d837b882f351a1ba80923cf78be6eb3a977cade9275dcf4033de8522 |
|
MD5 | 77fb7502aa872b21cfac52931b3c014f |
|
BLAKE2b-256 | f011886912705987c7fe30fc5862e3c73bc29d0c03065095c52bfce8e2c2c287 |