conway-polynomials


Nameconway-polynomials JSON
Version 0.9 PyPI version JSON
download
home_page
SummaryPython interface to Frank Lübeck's Conway polynomial database
upload_time2024-01-13 03:17:16
maintainer
docs_urlNone
author
requires_python>=3.9
licenseconway-polynomials - a python interface to Frank Lübeck's Conway polynomial database Copyright (C) 2023 The Sage Developers This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
keywords mathematics algebra conway polynomials
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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 tuple 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, 1, 0, 0, 1)

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

  >>> conway_polynomials.database() is conway_polynomials.database()
  True

However, the result is also mutable, so if you need to modify it for
some reason then you should create a copy; otherwise your changes will
affect future calls::

  >>> cpdb = conway_polynomials.database()
  >>> cpdb[5][5]
  (3, 4, 0, 0, 0, 1)
  >>> cpdb[5][5] = (8, 6, 7, 5, 3, 0, 9)
  >>> conway_polynomials.database()[5][5]
  (8, 6, 7, 5, 3, 0, 9)


Testing
=======

A few doctests within the module (and this README) ensure that
everything is working. You can run them from the repository or from a
release tarball using::

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

Or, if you have pytest installed, with simply::

  pytest

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "conway-polynomials",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "mathematics,algebra,Conway polynomials",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/25/94/39220f3cded2d47ef294695a1e7c94d9976972b6131f241515839263b5fe/conway-polynomials-0.9.tar.gz",
    "platform": null,
    "description": "Python interface to Frank L\u00fcbeck's Conway polynomial database\n\nIntroduction\n============\n\nFrank L\u00fcbeck maintains a list of pre-computed Conway polynomial\ncoefficients at,\n\n  https://www.math.rwth-aachen.de/~Frank.Luebeck/data/ConwayPol/index.html\n\nThese are used in several computer algebra systems such as GAP and\nSageMath to provide quick access to those Conway polynomials. The aim\nof this package is to make them available through a generic python\ninterface. The package consists of a single module containing a single\nfunction that returns a dict of dicts, ``conway_polynomials.database()``.\nThe dictionary's format is ``{p: {n: coefficients}}``, where ``p``\nrepresents your prime and ``n`` your degree. The tuple of coefficients\nis returned in ascending order; that is, the first coefficient (at\nindex zero) is for the constant (degree zero) term.\n\nThis package is an evolution of the SageMath *conway_polynomials*\npackage hosted at,\n\n  http://files.sagemath.org/spkg/upstream/conway_polynomials/\n\nand is maintained by the same team of developers. We have kept the\nversioning scheme consistent to reflect that.\n\n\nExamples\n========\n\nRetrieve the coefficients of the Conway polynomial for prime p=2 and\ndegree n=5::\n\n  >>> import conway_polynomials\n  >>> cpdb = conway_polynomials.database()\n  >>> cpdb[2][5]\n  (1, 0, 1, 0, 0, 1)\n\nThe result is cached, so subsequent computations should be fast even\nif you call the function again::\n\n  >>> conway_polynomials.database() is conway_polynomials.database()\n  True\n\nHowever, the result is also mutable, so if you need to modify it for\nsome reason then you should create a copy; otherwise your changes will\naffect future calls::\n\n  >>> cpdb = conway_polynomials.database()\n  >>> cpdb[5][5]\n  (3, 4, 0, 0, 0, 1)\n  >>> cpdb[5][5] = (8, 6, 7, 5, 3, 0, 9)\n  >>> conway_polynomials.database()[5][5]\n  (8, 6, 7, 5, 3, 0, 9)\n\n\nTesting\n=======\n\nA few doctests within the module (and this README) ensure that\neverything is working. You can run them from the repository or from a\nrelease tarball using::\n\n  PYTHONPATH=src python -m doctest \\\n    README.rst \\\n    src/conway_polynomials/__init__.py\n\nOr, if you have pytest installed, with simply::\n\n  pytest\n",
    "bugtrack_url": null,
    "license": "conway-polynomials - a python interface to Frank L\u00fcbeck's Conway polynomial database Copyright (C) 2023 The Sage Developers  This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.  You should have received a copy of the GNU General Public License along with this program.  If not, see <https://www.gnu.org/licenses/>. ",
    "summary": "Python interface to Frank L\u00fcbeck's Conway polynomial database",
    "version": "0.9",
    "project_urls": {
        "Changelog": "https://github.com/sagemath/conway-polynomials/raw/master/NEWS",
        "Documentation": "https://github.com/sagemath/conway-polynomials/blob/master/README.rst",
        "Homepage": "https://github.com/sagemath/conway-polynomials",
        "Issues": "https://github.com/sagemath/conway-polynomials/issues",
        "Repository": "https://github.com/sagemath/conway-polynomials.git"
    },
    "split_keywords": [
        "mathematics",
        "algebra",
        "conway polynomials"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0f2456c308ac3bce865a4123d5ff317e67534326b48e1ac6ddc5303ba736c05d",
                "md5": "331146ff6f7457552a03749662c1e977",
                "sha256": "720e1fcd74123c9ea1c18af7c2bdc131a225a721d119ee2d0f008275af2ed395"
            },
            "downloads": -1,
            "filename": "conway_polynomials-0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "331146ff6f7457552a03749662c1e977",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 177132,
            "upload_time": "2024-01-13T03:17:15",
            "upload_time_iso_8601": "2024-01-13T03:17:15.306884Z",
            "url": "https://files.pythonhosted.org/packages/0f/24/56c308ac3bce865a4123d5ff317e67534326b48e1ac6ddc5303ba736c05d/conway_polynomials-0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "259439220f3cded2d47ef294695a1e7c94d9976972b6131f241515839263b5fe",
                "md5": "a627e2653fc1fb2f332cecc8b459cc13",
                "sha256": "6ed2300609bce79f0175d5b8546858eec02854f8be3237db8d1449ccccc1c581"
            },
            "downloads": -1,
            "filename": "conway-polynomials-0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "a627e2653fc1fb2f332cecc8b459cc13",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 245106,
            "upload_time": "2024-01-13T03:17:16",
            "upload_time_iso_8601": "2024-01-13T03:17:16.964284Z",
            "url": "https://files.pythonhosted.org/packages/25/94/39220f3cded2d47ef294695a1e7c94d9976972b6131f241515839263b5fe/conway-polynomials-0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-13 03:17:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sagemath",
    "github_project": "conway-polynomials",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "conway-polynomials"
}
        
Elapsed time: 0.16335s