A simple python code for Scale arrays
Project description
ARRAY SCALER
Introduction
A simple python tool for scaling and rescaling arrays:
Installation
To install Array Scaler, run the following command:
pip install -e '.[lint, test]'
Usage
Here is a simple example of how to use Array Scaler:
from arrayscaler.arrayscaler import ScalingHelper
import numpy as np
# Scaling integers (5) with a lower limit of 0 and upper limit of 10
print(ScalingHelper.scale(5, 0, 10))
# Scaling numpy array
print(ScalingHelper.scale(np.array([1,3,4,5,3,2]), 0, 2))
# Rescaling the scaled numpy array
print(ScalingHelper.rescale(ScalingHelper.scale(np.array([1,3,4,5,3,2]), 0, 2), 0, 2))
The scale method will scale the input array to a range of 0 to 1. The rescale method will rescale the scaled array back to its original range.
Contributing
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arrayscaler-0.1.1.tar.gz.
File metadata
- Download URL: arrayscaler-0.1.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
487f8fbdf2945372bbf6b7940f7a4ad86ade38241541e8497c5ef09556911feb
|
|
| MD5 |
7ddebfc6b8f5f3f65bb13645f9f5fe6b
|
|
| BLAKE2b-256 |
c57811c428eb83c0278dd88ea21db968b1d400bd0bc4c5f335da6c9a784ddf35
|
File details
Details for the file arrayscaler-0.1.1-py3-none-any.whl.
File metadata
- Download URL: arrayscaler-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df48f3dc7e389b50381d330492031ae8d12319bfc0272c1e0e6d3a7c3ea51ec3
|
|
| MD5 |
de6afad4da09c9090f9d177c20b27704
|
|
| BLAKE2b-256 |
8ced7e724269ae3b5a2c4d48447f8078a34dd967e804f5346e0799d61483904d
|