{ "info": { "author": "Caleb Hattingh", "author_email": "caleb.hattingh@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": ".. image:: https://travis-ci.org/cjrh/cjrh_math.svg?branch=master\n :target: https://travis-ci.org/cjrh/cjrh_math\n\n.. image:: https://coveralls.io/repos/github/cjrh/cjrh_math/badge.svg?branch=master\n :target: https://coveralls.io/github/cjrh/cjrh_math?branch=master\n\n.. image:: https://img.shields.io/pypi/pyversions/cjrh_math.svg\n :target: https://pypi.python.org/pypi/cjrh_math\n\n.. image:: https://img.shields.io/github/tag/cjrh/cjrh_math.svg\n :target: https://img.shields.io/github/tag/cjrh/cjrh_math.svg\n\n.. image:: https://img.shields.io/badge/install-pip%20install%20cjrh_math-ff69b4.svg\n :target: https://img.shields.io/badge/install-pip%20install%20cjrh_math-ff69b4.svg\n\n.. image:: https://img.shields.io/pypi/v/cjrh_math.svg\n :target: https://img.shields.io/pypi/v/cjrh_math.svg\n\n.. image:: https://img.shields.io/badge/calver-YYYY.MM.MINOR-22bfda.svg\n :target: http://calver.org/\n\n\ncjrh_math\n======================\n\nA collection of handy maths functions.\n\nStreaming mean and variance\n---------------------------\n\nSometimes it can be very useful to update an *existing* mean and variance\nwith new data, rather than have to calculate it again over the whole set.\nThe functions below implement one of the algorithms described\nin `Wikipedia `_.\n\n.. code-block:: python\n\n def update_mean(n: int, mean: float, value: float) -> float\n\nGiven a new ``value``, calculate a new mean using the existing ``mean`` and\nthe size of data, ``n``, seen so far.\n\n.. code-block:: python\n\n def update_pvariance(n: int, mean: float, var: float, value: float) -> float\n def update_variance(n: int, mean: float, var: float, value: float) -> float\n\nGiven a new ``value``, calculate a new variance using the existing ``mean``,\nexisting variance ``var``, and the size of data, ``n``, seen so far.\n\nNote that ``update_variance()`` is for *sample* variance while\n``update_pvariance()`` is for *population* variance.\n\nAll functions are pure and therefore thread-safe.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cjrh/cjrh_math", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "cjrh_math", "package_url": "https://pypi.org/project/cjrh_math/", "platform": "", "project_url": "https://pypi.org/project/cjrh_math/", "project_urls": { "Homepage": "https://github.com/cjrh/cjrh_math" }, "release_url": "https://pypi.org/project/cjrh_math/2017.11.1/", "requires_dist": null, "requires_python": "", "summary": "Maths functions", "version": "2017.11.1" }, "last_serial": 3322407, "releases": { "2017.11.1": [ { "comment_text": "", "digests": { "md5": "4ed4cf27fc09a1b44c2574be90ec96b6", "sha256": "690e585cf87c578c538ca0964b36010f336940cd324a2f46fe0841274744952d" }, "downloads": -1, "filename": "cjrh_math-2017.11.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4ed4cf27fc09a1b44c2574be90ec96b6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13906, "upload_time": "2017-11-10T15:13:05", "url": "https://files.pythonhosted.org/packages/95/0d/be5b26ae3a546838604bcb112ecd7f7e5013d9d3dfb3f5cdad970a4301c3/cjrh_math-2017.11.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5d6c9161a21da119cd933254a740d13f", "sha256": "60a3b9d1f4a42e937aa97d2d2a14f21db13822794aaf261a4ccb321574b4d3f1" }, "downloads": -1, "filename": "cjrh_math-2017.11.1.tar.gz", "has_sig": false, "md5_digest": "5d6c9161a21da119cd933254a740d13f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6319, "upload_time": "2017-11-10T15:13:08", "url": "https://files.pythonhosted.org/packages/55/e8/6d12983dd31a8b79982d1bf1ea5e660f524271dd33e3671962a8cd306764/cjrh_math-2017.11.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4ed4cf27fc09a1b44c2574be90ec96b6", "sha256": "690e585cf87c578c538ca0964b36010f336940cd324a2f46fe0841274744952d" }, "downloads": -1, "filename": "cjrh_math-2017.11.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4ed4cf27fc09a1b44c2574be90ec96b6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13906, "upload_time": "2017-11-10T15:13:05", "url": "https://files.pythonhosted.org/packages/95/0d/be5b26ae3a546838604bcb112ecd7f7e5013d9d3dfb3f5cdad970a4301c3/cjrh_math-2017.11.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5d6c9161a21da119cd933254a740d13f", "sha256": "60a3b9d1f4a42e937aa97d2d2a14f21db13822794aaf261a4ccb321574b4d3f1" }, "downloads": -1, "filename": "cjrh_math-2017.11.1.tar.gz", "has_sig": false, "md5_digest": "5d6c9161a21da119cd933254a740d13f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6319, "upload_time": "2017-11-10T15:13:08", "url": "https://files.pythonhosted.org/packages/55/e8/6d12983dd31a8b79982d1bf1ea5e660f524271dd33e3671962a8cd306764/cjrh_math-2017.11.1.tar.gz" } ] }