combpyter
A lightweight Python library for generating and analyzing combinatorial objects.
Installation
The latest release is simply pip-installable via PyPI. Simply run
pip install combpyter
to install the library.
Features
Please note that this is a personal and mostly research-driven project. As such, the implemented combinatorial structures span, for the time being, a narrow scope.
Currently, combpyter supports the following combinatorial objects:
- Dyck paths (elements:
DyckPath, generator:DyckPaths)
Example usage
This snippet iterates over all Dyck paths of semi-length 8 and computes the distribution of the number of peaks (which is a statistic described by Narayana numbers).
>>> from combpyter import DyckPaths
>>> from collections import defaultdict
>>> peak_distribution = defaultdict(int)
>>> for path in DyckPaths(8):
... num_peaks = len(path.peaks())
... peak_distribution[num_peaks] += 1
...
>>> for num_peaks, num_paths in peak_distribution.items():
... print(f"There are {num_paths} Dyck paths with {num_peaks} peaks.")
...
There are 1 Dyck paths with 1 peaks.
There are 28 Dyck paths with 2 peaks.
There are 196 Dyck paths with 3 peaks.
There are 490 Dyck paths with 4 peaks.
There are 490 Dyck paths with 5 peaks.
There are 196 Dyck paths with 6 peaks.
There are 28 Dyck paths with 7 peaks.
There are 1 Dyck paths with 8 peaks.
Metadata
Release files for combpyter 0.0.6
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 |
|---|---|---|---|---|
| combpyter-0.0.6.tar.gz | 44.0 kB | Without provenance | Details for combpyter-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| combpyter-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for combpyter-0.0.6-py3-none-any.whl |
Total release size: 50.1 kB
Release files / combpyter-0.0.6.tar.gz
| Download URL | combpyter-0.0.6.tar.gz |
|---|---|
| Size | 44.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f815fd583773c8d45abc1a40f167f416f8b3b486090b924b8562fd283eadb29d
|
|
BLAKE2b-256 checksum How to use checksums |
9ab5a53c5bd07f07de0e9a0ce1c0a4747a1d54f20514394349ec572f9dfbc6e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.6.5
|
Release files / combpyter-0.0.6-py3-none-any.whl
| Download URL | combpyter-0.0.6-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7c30f00518f11038847d42abd60910df351c8db635f608d5311277d270c3cf0
|
|
BLAKE2b-256 checksum How to use checksums |
2d4835893cc4dfb219f050273443d92aad9d56e3d0338c89bcb384774767f628
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.6.5
|
Security for combpyter 0.0.6
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.