Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

modify_range-0.0.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

modify_range-0.0.2-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file modify_range-0.0.2.tar.gz.

File metadata

  • Download URL: modify_range-0.0.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for modify_range-0.0.2.tar.gz
Algorithm Hash digest
SHA256 142e64c731c9e9b87c3181b89fa527e17e33f69d1af0fc1aa608792a51c9603a
MD5 77b7f65cec642c2cb323e4a3057fd876
BLAKE2b-256 fd2f4e2df2fbd7b035980ae178ce97eb98ce777bf914d82c9cb0c485d197051b

See more details on using hashes here.

File details

Details for the file modify_range-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: modify_range-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for modify_range-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9a171ad7d837b882f351a1ba80923cf78be6eb3a977cade9275dcf4033de8522
MD5 77fb7502aa872b21cfac52931b3c014f
BLAKE2b-256 f011886912705987c7fe30fc5862e3c73bc29d0c03065095c52bfce8e2c2c287

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page