multivar-horner


Namemultivar-horner JSON
Version 3.0.5 PyPI version JSON
download
home_pagehttps://multivar-horner.readthedocs.io/en/latest/
Summarypython package implementing a multivariate Horner scheme for efficiently evaluating multivariate polynomials
upload_time2022-12-10 15:39:39
maintainer
docs_urlNone
authorjannikmi
requires_python>=3.8,<4
licenseMIT
keywords mathematics polynomials evaluation multivariate horner-scheme
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ===============
multivar_horner
===============


.. image:: https://travis-ci.org/jannikmi/multivar_horner.svg?branch=master
    :alt: CI status
    :target: https://travis-ci.org/jannikmi/multivar_horner

.. image:: https://readthedocs.org/projects/multivar_horner/badge/?version=latest
    :alt: documentation status
    :target: https://multivar_horner.readthedocs.io/en/latest/?badge=latest

.. image:: https://img.shields.io/pypi/wheel/multivar-horner.svg
    :target: https://pypi.python.org/pypi/multivar-horner

.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
   :target: https://github.com/pre-commit/pre-commit
   :alt: pre-commit

.. image:: https://pepy.tech/badge/multivar-horner
    :alt: Total PyPI downloads
    :target: https://pepy.tech/project/multivar-horner

.. image:: https://img.shields.io/pypi/v/multivar_horner.svg
    :alt: latest version on PyPI
    :target: https://pypi.python.org/pypi/multivar-horner

.. image:: https://joss.theoj.org/papers/0b514c6894780f3cc81ed88c141631d4/status.svg
    :alt: JOSS status
    :target: https://joss.theoj.org/papers/0b514c6894780f3cc81ed88c141631d4

.. image:: https://zenodo.org/badge/155578190.svg
   :target: https://zenodo.org/badge/latestdoi/155578190

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/psf/black


``multivar_horner`` is a python package implementing a multivariate
`Horner scheme ("Horner's method", "Horner's rule") <https://en.wikipedia.org/wiki/Horner%27s_method>`__
for efficiently evaluating multivariate polynomials.


Quick Guide:

::


    pip install multivar_horner


For efficiency this package is compiling the instructions required for polynomial evaluation to C by default.
If you don't have a C compiler (``gcc`` or ``cc``) installed you also need to install numba for using an alternative method:

::


    pip install multivar_horner[numba]


Simple example:

.. code-block:: python

    import numpy as np
    from multivar_horner import HornerMultivarPolynomial

    # input parameters defining the polynomial
    #   p(x) = 5.0 + 1.0 x_1^3 x_2^1 + 2.0 x_1^2 x_3^1 + 3.0 x_1^1 x_2^1 x_3^1
    coefficients = np.array([[5.0], [1.0], [2.0], [3.0]], dtype=np.float64)
    exponents = np.array([[0, 0, 0], [3, 1, 0], [2, 0, 1], [1, 1, 1]], dtype=np.uint32)

    # [#ops=7] p(x) = x_1 (x_1 (x_1 (1.0 x_2) + 2.0 x_3) + 3.0 x_2 x_3) + 5.0
    horner_polynomial = HornerMultivarPolynomial(coefficients, exponents)
    x = np.array([-2.0, 3.0, 1.0], dtype=np.float64)
    p_x = horner_polynomial(x)


For more refer to the `documentation <https://multivar_horner.readthedocs.io/en/latest/>`__.


Also see:
`GitHub <https://github.com/jannikmi/multivar_horner>`__,
`PyPI <https://pypi.python.org/pypi/multivar_horner/>`__,
`arXiv paper <https://arxiv.org/abs/2007.13152>`__


            

Raw data

            {
    "_id": null,
    "home_page": "https://multivar-horner.readthedocs.io/en/latest/",
    "name": "multivar-horner",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4",
    "maintainer_email": "",
    "keywords": "mathematics,polynomials,evaluation,multivariate,horner-scheme",
    "author": "jannikmi",
    "author_email": "github@michelfe.it",
    "download_url": "https://files.pythonhosted.org/packages/01/7c/7eadbba0ac570b504c1499c186e0e3efde5a3c32cf39fa6d64a5fe9fd332/multivar_horner-3.0.5.tar.gz",
    "platform": null,
    "description": "===============\nmultivar_horner\n===============\n\n\n.. image:: https://travis-ci.org/jannikmi/multivar_horner.svg?branch=master\n    :alt: CI status\n    :target: https://travis-ci.org/jannikmi/multivar_horner\n\n.. image:: https://readthedocs.org/projects/multivar_horner/badge/?version=latest\n    :alt: documentation status\n    :target: https://multivar_horner.readthedocs.io/en/latest/?badge=latest\n\n.. image:: https://img.shields.io/pypi/wheel/multivar-horner.svg\n    :target: https://pypi.python.org/pypi/multivar-horner\n\n.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white\n   :target: https://github.com/pre-commit/pre-commit\n   :alt: pre-commit\n\n.. image:: https://pepy.tech/badge/multivar-horner\n    :alt: Total PyPI downloads\n    :target: https://pepy.tech/project/multivar-horner\n\n.. image:: https://img.shields.io/pypi/v/multivar_horner.svg\n    :alt: latest version on PyPI\n    :target: https://pypi.python.org/pypi/multivar-horner\n\n.. image:: https://joss.theoj.org/papers/0b514c6894780f3cc81ed88c141631d4/status.svg\n    :alt: JOSS status\n    :target: https://joss.theoj.org/papers/0b514c6894780f3cc81ed88c141631d4\n\n.. image:: https://zenodo.org/badge/155578190.svg\n   :target: https://zenodo.org/badge/latestdoi/155578190\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/psf/black\n\n\n``multivar_horner`` is a python package implementing a multivariate\n`Horner scheme (\"Horner's method\", \"Horner's rule\") <https://en.wikipedia.org/wiki/Horner%27s_method>`__\nfor efficiently evaluating multivariate polynomials.\n\n\nQuick Guide:\n\n::\n\n\n    pip install multivar_horner\n\n\nFor efficiency this package is compiling the instructions required for polynomial evaluation to C by default.\nIf you don't have a C compiler (``gcc`` or ``cc``) installed you also need to install numba for using an alternative method:\n\n::\n\n\n    pip install multivar_horner[numba]\n\n\nSimple example:\n\n.. code-block:: python\n\n    import numpy as np\n    from multivar_horner import HornerMultivarPolynomial\n\n    # input parameters defining the polynomial\n    #   p(x) = 5.0 + 1.0 x_1^3 x_2^1 + 2.0 x_1^2 x_3^1 + 3.0 x_1^1 x_2^1 x_3^1\n    coefficients = np.array([[5.0], [1.0], [2.0], [3.0]], dtype=np.float64)\n    exponents = np.array([[0, 0, 0], [3, 1, 0], [2, 0, 1], [1, 1, 1]], dtype=np.uint32)\n\n    # [#ops=7] p(x) = x_1 (x_1 (x_1 (1.0 x_2) + 2.0 x_3) + 3.0 x_2 x_3) + 5.0\n    horner_polynomial = HornerMultivarPolynomial(coefficients, exponents)\n    x = np.array([-2.0, 3.0, 1.0], dtype=np.float64)\n    p_x = horner_polynomial(x)\n\n\nFor more refer to the `documentation <https://multivar_horner.readthedocs.io/en/latest/>`__.\n\n\nAlso see:\n`GitHub <https://github.com/jannikmi/multivar_horner>`__,\n`PyPI <https://pypi.python.org/pypi/multivar_horner/>`__,\n`arXiv paper <https://arxiv.org/abs/2007.13152>`__\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "python package implementing a multivariate Horner scheme for efficiently evaluating multivariate polynomials",
    "version": "3.0.5",
    "split_keywords": [
        "mathematics",
        "polynomials",
        "evaluation",
        "multivariate",
        "horner-scheme"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "d89e2c77f139deb9077ed18257d8bbaa",
                "sha256": "378a4c1f081a9f3d27070987c8df0f4d2e3ed1f16b5a1c9eebafec0d3cb5ae7c"
            },
            "downloads": -1,
            "filename": "multivar_horner-3.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d89e2c77f139deb9077ed18257d8bbaa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4",
            "size": 54105,
            "upload_time": "2022-12-10T15:39:37",
            "upload_time_iso_8601": "2022-12-10T15:39:37.362641Z",
            "url": "https://files.pythonhosted.org/packages/ba/d8/b4e9597b6e57a5a0638817ee5d8ae95d9114f21cb079794c75344bd2a22e/multivar_horner-3.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "ac35082619bfc14c1003acb0b111638f",
                "sha256": "0c495334df84383b084d0ca8d15a33c8a87d0f15e1fbf8a52d90907be7af6f84"
            },
            "downloads": -1,
            "filename": "multivar_horner-3.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "ac35082619bfc14c1003acb0b111638f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4",
            "size": 44837,
            "upload_time": "2022-12-10T15:39:39",
            "upload_time_iso_8601": "2022-12-10T15:39:39.025674Z",
            "url": "https://files.pythonhosted.org/packages/01/7c/7eadbba0ac570b504c1499c186e0e3efde5a3c32cf39fa6d64a5fe9fd332/multivar_horner-3.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-10 15:39:39",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "multivar-horner"
}
        
Elapsed time: 0.01611s