It helps to model the Python and R intervals seamlessly.
Project description
deciphon-intervals
It helps to model the two primary interval definitions in the programming realm: 0-start, half-open interval (aka Python interval), and 1-start, fully-closed interval (aka R interval).
Example
from deciphon_intervals import PyInterval, RInterval, Interval
x = [1, 2, 4, 8]
print(x[PyInterval(start=1, stop=3).slice])
print(x[RInterval(start=2, stop=3).slice])
# [2, 4]
# [2, 4]
interval: Interval = RInterval(start=2, stop=3)
print(interval.py)
print(interval.r)
# PyInterval(start=1, stop=3)
# RInterval(start=2, stop=3)
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
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 deciphon_intervals-1.0.0.tar.gz.
File metadata
- Download URL: deciphon_intervals-1.0.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0fcaafa46b2af4264a2fe7ed3574181f2b246f1a68ea0ce5060d52af8fabf2d
|
|
| MD5 |
1268f88e3d9224c3e0b4ceca3ea90683
|
|
| BLAKE2b-256 |
dd1c4e071ef8de5054573a9298e7bda0e4304e1d945448ef4898f6846c82f898
|
File details
Details for the file deciphon_intervals-1.0.0-py3-none-any.whl.
File metadata
- Download URL: deciphon_intervals-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e70306d2fe39f056e297ad3420a667a53f72ab884492dc18819fba9234b23a0
|
|
| MD5 |
abd24a52a4cba015466abace35c074e5
|
|
| BLAKE2b-256 |
08297ae2d617df0b5cae010ccbe13f8871c826a437ecff5c1d1f678f9f3ea663
|