{"id":16461522,"url":"https://github.com/borchehq/incstatspy","last_synced_at":"2026-05-01T18:31:32.630Z","repository":{"id":255446471,"uuid":"838819759","full_name":"borchehq/incstatspy","owner":"borchehq","description":"NumPy based Python library for online calculation of moments .","archived":false,"fork":false,"pushed_at":"2024-09-09T12:49:24.000Z","size":127,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-01T05:01:55.453Z","etag":null,"topics":["central-moments","mean","numpy","numpy-arrays","numpy-library","online-algorithms","rolling-statistics","running-statistics","statistics","variance"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/borchehq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-06T12:06:11.000Z","updated_at":"2024-09-09T12:39:10.000Z","dependencies_parsed_at":"2024-09-09T14:57:34.810Z","dependency_job_id":null,"html_url":"https://github.com/borchehq/incstatspy","commit_stats":null,"previous_names":["borchehq/incstatspy"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borchehq%2Fincstatspy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borchehq%2Fincstatspy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borchehq%2Fincstatspy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borchehq%2Fincstatspy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/borchehq","download_url":"https://codeload.github.com/borchehq/incstatspy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238480617,"owners_count":19479521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["central-moments","mean","numpy","numpy-arrays","numpy-library","online-algorithms","rolling-statistics","running-statistics","statistics","variance"],"created_at":"2024-10-11T11:08:28.949Z","updated_at":"2025-10-27T10:30:56.550Z","avatar_url":"https://github.com/borchehq.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# incstatspy\n\nA Python C extension for efficiently calculating statistics iteratively on NumPy arrays. This module provides functions for computing mean, variance, skewness, kurtosis, and central moments.\n\n## Status\n![Build Status](https://github.com/borchehq/incstatsPy/actions/workflows/ci.yml/badge.svg)\n[![codecov](https://codecov.io/gh/borchehq/incstatsPy/graph/badge.svg?token=ZSESQKJEKQ)](https://codecov.io/gh/borchehq/incstatsPy)\n[![PyPI - Version](https://img.shields.io/pypi/v/incstatspy?label=PyPI\u0026color=green\u0026cacheSeconds=120)](https://pypi.org/project/incstatspy/)\n\n\n## Features\n\n- Compute running mean, variance, skewness, and kurtosis.\n- Calculate central moments up to a specified order.\n- Calculate standardized central moments up to a specified order.\n- Determine minimum and maximum values.\n- Designed for efficiency and simplicity.\n- Handles weighted data points.\n- Iterative update functionality when calling on multiple ndarrays of compatible shape.\n\n## Installation\n\nYou can install this project using `pip`:\n\n### Using pip\n\nTo install the latest version from PyPI:\n\n```bash\npip install incstatspy\n```\n\n### From Source\n\nIf you want to install the project from the source code:\n\n```bash\ngit clone https://github.com/borchehq/incstatsPy.git\ncd incstatspy\npip install .\n```\n\n## Usage\n```python\nimport incstatspy\nimport numpy as np\n\n\n# Calculate mean\nndarray = np.array(np.random.rand())\nmean, buffer = incstatspy.mean(ndarray)\nprint(mean)\n# Update mean with new data\nndarray = np.array(np.random.rand())\nprint(mean)\nmean, buffer = incstatspy.mean(ndarray, buffer=buffer)\n# Calculate variance\nndarray = np.array(np.random.rand())\n# Mean will be automatically calculated with variance\nmean, variance, buffer = incstatspy.variance(ndarray)\nprint(variance)\nndarray = np.array(np.random.rand())\n# Update mean and variance\nmean, variance, buffer = incstatspy.variance(ndarray, buffer=buffer)\nprint(variance)\nndarray = np.random.rand(3, 3)\n# Calculate skewness (variance and mean will be automatically calculated as well)\n*_, skewness, buffer = incstatspy.skewness(ndarray) # discard mean and variance\nprint(skewness)\nndarray = np.random.rand(3, 3)\n# Update skewness\n*_, skewness, buffer = incstatspy.skewness(ndarray, buffer=buffer)\nprint(skewness)\nndarray = np.random.rand(3, 3)\n# Calculate kurtosis (skewness, variance and mean will be automatically calculated as well)\n*_, kurtosis, buffer = incstatspy.kurtosis(ndarray) # discard mean, variance and skewness\nprint(kurtosis)\nndarray = np.random.rand(3, 3)\n# Update kurtosis\n*_, kurtosis, buffer = incstatspy.kurtosis(ndarray, buffer=buffer)\nprint(kurtosis)\n# Calculate 8th moment and discard lower moments. Mean will be calculated as well.\n# Calculate along axis 1 (default: axis 0)\np = 8\nndarray = np.random.rand(3, 3)\n*_, pth_moment, mean, buffer = incstatspy.central_moment(ndarray, p, axis=1)\nprint(pth_moment)\nndarray = np.random.rand(3, 3)\n# Update 8th moment\n*_, pth_moment, mean, buffer = incstatspy.central_moment(ndarray, p, axis=1, buffer=buffer)\nprint(pth_moment)\n```\n\n## License\n\nThis project is licensed under the Apache License, Version 2.0. You may obtain a copy of the License at:\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nThe full text of the license is available in the `LICENSE.txt` file in this repository.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborchehq%2Fincstatspy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborchehq%2Fincstatspy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborchehq%2Fincstatspy/lists"}