矩阵区间压缩
Quick start
# https://pypi.org/project/range-compression/
pip install range-compression
from range_compression import RangeCompressedMask, mask_encode
from pathlib import Path
mtx = .... # 带有很多连续值的矩阵
rcm = mask_encode(mtx)
X, Y = ..., ... # 要查找的 X, Y
res = rcm.find_index(X, Y)
assert res.shape == X.shape
assert (mtx[Y, X] == res).all()
# 也可以 rcm.save(p)
# 之后在其他地方 rcm = RangeCompressedMask.load(p)
TODO
- 把性能测试添加到测试和 readme 中
- 每个版本做性能回归测试
- 添加更多说明和直接能运行的快速入门
关于 Python 版本
支持 >=3.8, <=3.12
但 numba0.59 已经不再支持 Python3.8,如果以后使用到了 numba 新版本的特性,那么 Python3.8 可能不再会支持
Metadata
Release files for range-compression 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| range_compression-0.5.0.tar.gz | 4.7 kB | Without provenance | Details for range_compression-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| range_compression-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for range_compression-0.5.0-py3-none-any.whl |
Total release size: 9.9 kB
Release files / range_compression-0.5.0.tar.gz
| Download URL | range_compression-0.5.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0da84f56f1b31c92eeeab94dddeeae1371bfd156636129161c0b2b30e7afe629
|
|
BLAKE2b-256 checksum How to use checksums |
e4cb5b69f0080ec2633d46f2d8f1e33bfb4fdae39c797760c5a7f9f1716c7dff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.4 Linux/6.6.40-1-MANJARO
|
Release files / range_compression-0.5.0-py3-none-any.whl
| Download URL | range_compression-0.5.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f24cef3355dc5fcbb9d26af8ad3edef541745640060238545278c8ff13ce02f
|
|
BLAKE2b-256 checksum How to use checksums |
bd4a81e6dd6fe1a61823fcb5d32cc4a1397847cadaadac7c42ac1a412c460310
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.4 Linux/6.6.40-1-MANJARO
|
Security for range-compression 0.5.0
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.