linear_segmentation
Automatic sparse sampling of 1-D array into linear segments minimizing error
Install from clone
pip install .
Install from PYPI
pip install linear_segmentation
Example
python -m linear_segmentation.examples.linear_segmentation_with_slider.py
Usage
from linear_segmentation import linear_segmentation
from linear_segmentation import refinement # optional
import scipy.interpolation as spint
...
x, y = linear_segmentation(data, tol=0.001) # normalized abs error tolerance
x_refined, y_refined = refinement(data, x) # optional refinement using least squares
data_interp = spint.interp1d(x_refined, y_refined) # or x, y
...
new_y = data_interp(new_x)
Metadata
Release files for linear-segmentation 0.2.post2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| linear_segmentation-0.2.post2-py3-none-any.whl | Python 3 | none | any | Details for linear_segmentation-0.2.post2-py3-none-any.whl |
Release files / linear_segmentation-0.2.post2-py3-none-any.whl
| Download URL | linear_segmentation-0.2.post2-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd4cbd885faa3f68e632e89f992d2a05720f5c065b8af31d8f3fa76b01505357
|
|
BLAKE2b-256 checksum How to use checksums |
47429440d01c775b611d8fdad2c05ad3694b969722ce4b7cfd7e933880735f6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Security for linear-segmentation 0.2.post2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.