Skip to main content

No project description provided

Project description

矩阵区间压缩

Quick start

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()

TODO

[ ] 把性能测试添加到测试和 readme 中,每个版本做性能回归测试
[ ] 添加更多说明和直接能运行的快速入门

Python3.12

这个库严重依赖 numba:https://github.com/numba/numba/issues/9197

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

range_compression-0.3.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

range_compression-0.3.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file range_compression-0.3.0.tar.gz.

File metadata

  • Download URL: range_compression-0.3.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.3 Linux/6.6.6-2-MANJARO

File hashes

Hashes for range_compression-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b518236932d5d5a2b8d8fc63b7385612702eae0a9edefc21faede05d8a777dc1
MD5 d9afa78e85bf8329cf1f4165bd163add
BLAKE2b-256 27dc78fbe2ba52b07cca07115f3e761e8fb4cece2995b514246661652f28c36a

See more details on using hashes here.

File details

Details for the file range_compression-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: range_compression-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.3 Linux/6.6.6-2-MANJARO

File hashes

Hashes for range_compression-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8600b6c5740480d5b66239bed4a4115064532ef0160c37504260786c490958f3
MD5 d41799b6e3d2bbacceb172ab1bad8790
BLAKE2b-256 813e1fc7e114531cedc38ca77e793e99c8f2805f8f2901b89bf2c6ff071631a1

See more details on using hashes here.

Supported by

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