Skip to main content

permpy

PermPy is a user-friendly Python library for maniupulating permutation patterns and permutation classes. See Wikipedia for an introduction to permutation patterns.

Installation

Install permpy with pip:

$ python -m pip install permpy

Usage

permpy contains a number of useful Python classes including permpy.Permutation, which represents a permutation and can determine containment.

>>> from permpy import Permutation
>>> p = Permutation(1324)
>>> q = Permutation(123)
>>> q <= p
True
>>> r = Permutation(321)
>>> r <= p
False
>>> S = pp.PermSet.all(6)
>>> S
Set of 720 permutations
>>> S.total_statistic(pp.Perm.num_inversions)
5400
>>> S.total_statistic(pp.Perm.num_descents)
1800
>>> from permpy import AvClass
>>> A = AvClass([132])
>>> for S in A:
...     print(S)
... 
Set of 1 permutations
Set of 1 permutations
Set of 2 permutations
Set of 5 permutations
Set of 14 permutations
Set of 42 permutations
Set of 132 permutations
Set of 429 permutations
Set of 1430 permutations 

Build Instructions

For a summary of how PermPy is built, go here.

$ python -m poetry build
$ python -m poetry publish

Test Instructions

To run tests, run

$ python -m poetry build
$ python -m poetry shell
$ python -m pytest tests/

To build and install locally, run

$ python -m poetry install
$ python -m poetry shell
$ python
>>> import permpy
>>>

Metadata

Release files for permpy 0.2.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for permpy 0.2.12
File Size Uploaded
permpy-0.2.12.tar.gz 34.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for permpy 0.2.12
File Interpreter ABI Platform
permpy-0.2.12-py3-none-any.whl Python 3 none any Details

Total release size: 76.9 kB

Release files / permpy-0.2.12.tar.gz

Download URL permpy-0.2.12.tar.gz
Size 34.7 kB
Tags Source
SHA-256 checksum
How to use checksums
eef2ef2853fe3b5b4d466ad2cdd53822bb2e97c25c8dc5a9bc61e9066cab3868
BLAKE2b-256 checksum
How to use checksums
5dfd2a20b5da161c9bd68ba644285f4febd7032ba00a2093b762307843e2f8e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / permpy-0.2.12-py3-none-any.whl

Download URL permpy-0.2.12-py3-none-any.whl
Size 42.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57b9d165ec199a1ad82b8dad9d24397a21ae4fe291a4ccb178fa46b5b108be09
BLAKE2b-256 checksum
How to use checksums
fd71b81bc3511f5af999f3bbf49152a63dd771c6de4a5503763c3f70188e3e72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.2.12 This release

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.2

2 release files

0.2.0

2 release files

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page