Generate approximately uniformly distributed random integer partitions.
Project description
Generate random integer partitions
This is a python wrapper for the rust crate random-partition for generating integers partitions with a given number of parts.
Example
import random_partition_py as rpp
# generates a single partition of 20 into 5 parts
print(rpp.random_partitions(20, 5))
# generates multiple partitions
print(rpp.random_partitions(20, 5, 3))
# same thing but with an additional seed (note that the seed is kw-only)
print(rpp.random_partitions_seeded(20, 5, 3, seed=0))
Project details
Release history Release notifications | RSS feed
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 random_partition_py-0.2.0.tar.gz.
File metadata
- Download URL: random_partition_py-0.2.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e0577745c22d0cd94a92296dd5d87aa06cf4304f31f24b7f85d18363bd7c9dc
|
|
| MD5 |
e596e05c925869f71d22694f16e059be
|
|
| BLAKE2b-256 |
afad846c4d9987e942555d1c16cabdd69debac4022fc19123d4b5979858e6f5f
|
File details
Details for the file random_partition_py-0.2.0-cp310-cp310-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: random_partition_py-0.2.0-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 356.5 kB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81c353e309fba57fdde4fd901f88e1c5ebd9be229a5ac64c62e251781e921c89
|
|
| MD5 |
20bdc00492ed5283a8e302f68d3eab11
|
|
| BLAKE2b-256 |
23b6b6d33cede0fb0b22a75292730605eadaf852b3a97bff0771752e751251fd
|