Skip to main content

Python interface to Frank Lübeck's Conway polynomial database

Project description

Python interface to Frank Lübeck’s Conway polynomial database

Introduction

Frank Lübeck maintains a list of pre-computed Conway polynomial coefficients at,

https://www.math.rwth-aachen.de/~Frank.Luebeck/data/ConwayPol/index.html

These are used in several computer algebra systems such as GAP and SageMath to provide quick access to those Conway polynomials. The aim of this package is to make them available through a generic python interface. The package consists of a single module containing a single function that returns a dict of dicts, conway_polynomials.database(). The dictionary’s format is {p => {n => coefficients}}, where p represents your prime and n your degree. The list of coefficients is returned in ascending order; that is, the first coefficient (at index zero) is for the constant (degree zero) term.

This package is an evolution of the SageMath conway_polynomials package hosted at,

http://files.sagemath.org/spkg/upstream/conway_polynomials/

and is maintained by the same team of developers. We have kept the versioning scheme consistent to reflect that.

Examples

Retrieve the coefficients of the Conway polynomial for prime p=2 and degree n=5:

>>> import conway_polynomials
>>> cpdb = conway_polynomials.database()
>>> cpdb[2][5]
[1, 0, 2, 0, 0, 5]

The result is cached, so subsequent computations should be fast even if you call the function again:

>>> conway_polynomials.database()[5][5]
[3, 4, 0, 0, 0, 1]

Testing

A few doctests within the module verify that everything is working. You can run them from the repository or from a release tarball using:

PYTHONPATH=src python -m doctest src/conway_polynomials/__init__.py

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

conway-polynomials-0.6.tar.gz (229.3 kB view details)

Uploaded Source

Built Distribution

conway_polynomials-0.6-py3-none-any.whl (230.5 kB view details)

Uploaded Python 3

File details

Details for the file conway-polynomials-0.6.tar.gz.

File metadata

  • Download URL: conway-polynomials-0.6.tar.gz
  • Upload date:
  • Size: 229.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for conway-polynomials-0.6.tar.gz
Algorithm Hash digest
SHA256 95d109eb2cdf7e64c964c5de93725c94a8ee4136dbc148a770b6888673227d40
MD5 f1682e524d58be6cc9ef111ec5368434
BLAKE2b-256 304a3a6a5cd8a1bed470b80c988ff1fb60c6af365ee50c3998b1f658e68b12bf

See more details on using hashes here.

Provenance

File details

Details for the file conway_polynomials-0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for conway_polynomials-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 aa32bf74833a81ebeaa157f473ba232379fbaf329141d1948a7b8b3b12b5abce
MD5 cc5db9705dd7fee9567d542f6544bd3c
BLAKE2b-256 8deeb66365bd8ddce62ed9c02034d06b28be264942f2de31f29350b7173078df

See more details on using hashes here.

Provenance

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